@Override protected CharSequence getSubstitutionText() { return elemHandle.getBinaryName(); }
public CharSequence getInsertPrefix() { return smartItem ? "" : elemHandle.getBinaryName(); // NOI18N }
protected final void report (final ElementHandle<TypeElement> te, final long crc) { this.result.add(Pair.of(te, crc)); //On the IBM VMs the swing is in separate jar (graphics.jar) where no j.l package exists, don't prebuild such an archive. //The param names will be created on deamand final String binName = te.getBinaryName(); if (OBJECT.equals(binName)) { preBuildArgsState|=1; } else if (JCOMPONENT.equals(binName)) { preBuildArgsState|=2; } }
@Override public int compare( final Pair<ElementHandle<TypeElement>,Long> o1, final Pair<ElementHandle<TypeElement>,Long> o2) { return o1.first().getBinaryName().compareTo(o2.first().getBinaryName()); } };
private void storeCRCs(final File indexFolder, final List<Pair<ElementHandle<TypeElement>,Long>> state) throws IOException { final File file = new File (indexFolder,CRC); if (state.isEmpty()) { file.delete(); } else { final PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file),"UTF-8")); //NOI18N try { for (Pair<ElementHandle<TypeElement>,Long> pair : state) { StringBuilder sb = new StringBuilder(pair.first().getBinaryName()); sb.append('='); //NOI18N sb.append(pair.second().longValue()); out.println(sb.toString()); } } finally { out.close(); } } }
private static void deleteSigFiles(final URL root, final List<? extends ElementHandle<TypeElement>> toRemove) throws IOException { File cacheFolder = JavaIndex.getClassFolder(root); if (cacheFolder.exists()) { if (toRemove.size() > CLEAN_ALL_LIMIT) { //Todo: do as SlowIOTask FileObjects.deleteRecursively(cacheFolder); } else { for (ElementHandle<TypeElement> eh : toRemove) { final StringBuilder sb = new StringBuilder(FileObjects.convertPackage2Folder(eh.getBinaryName(),File.separatorChar)); sb.append('.'); //NOI18N sb.append(FileObjects.SIG); final File f = new File (cacheFolder, sb.toString()); f.delete(); } } } }
newE = newIt.next(); int ni = oldE.first().getBinaryName().compareTo(newE.first().getBinaryName()); if (ni == 0) { if (oldE.second().longValue() == 0 || oldE.second().longValue() != newE.second().longValue()) {
throws IOException { final Pattern anonymousInnerClassPattern = Pattern.compile("\\$[0-9]*"); final int parentClassNameLength = typeHandle.getBinaryName().length(); FileObject fo = org.netbeans.api.java.source.SourceUtils.getFile(typeHandle, controller.getClasspathInfo());
if (ANONYMOUS.matcher(i.next().getBinaryName()).find()) { i.remove();