/** Returns the ClassMemberSpecification currently represented in this dialog. */ public ClassMemberSpecification getClassMemberSpecification() { String name = nameTextField.getText(); String type = typeTextField.getText(); String arguments = argumentsTextField.getText(); if (name.equals("") || name.equals("*")) { name = null; } if (type.equals("") || type.equals("*")) { type = null; } if (name != null || type != null) { if (isField) { if (type == null) { type = ClassConstants.EXTERNAL_TYPE_INT; } type = ClassUtil.internalType(type); } else { if (type == null) { type = ClassConstants.EXTERNAL_TYPE_VOID; } type = ClassUtil.internalMethodDescriptor(type, ListUtil.commaSeparatedList(arguments)); } } ClassMemberSpecification classMemberSpecification = new ClassMemberSpecification(0, 0, name, type); // Also get the access radio button settings. getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_PUBLIC, publicRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_PRIVATE, privateRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_PROTECTED, protectedRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_STATIC, staticRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_FINAL, finalRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_VOLATILE, volatileRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_TRANSIENT, transientRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_SYNCHRONIZED, synchronizedRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_NATIVE, nativeRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_ABSTRACT, abstractRadioButtons); getClassMemberSpecificationRadioButtons( classMemberSpecification, ClassConstants.INTERNAL_ACC_STRICT, strictRadioButtons); return classMemberSpecification; }
public void removePaths(VirtualFile... paths) { final Set<VirtualFile> pathsSet = new java.util.HashSet<VirtualFile>(Arrays.asList(paths)); int size = getRowCount(); final TIntArrayList indicesToRemove = new TIntArrayList(paths.length); for (int idx = 0; idx < size; idx++) { VirtualFile path = getValueAt(idx); if (pathsSet.contains(path)) { indicesToRemove.add(idx); } } final List list = ListUtil.removeIndices(myList, indicesToRemove.toNativeArray()); itemsRemoved(list); }
protected void doRemoveItems(int[] idxs, JList list) { List removedItems = ListUtil.removeIndices(list, idxs); itemsRemoved(removedItems); }