public List<IPath> getAllWorkspaceLocations() { final List<IPath> result = new ArrayList<>(); WORKSPACE_MAPPINGS.accept(getNd(), this.address, new Visitor<NdWorkspaceLocation>() { @Override public void visit(int index, NdWorkspaceLocation toVisit) { result.add(new Path(toVisit.getPath().getString())); } }); return result; }
public long getJdkLevel() { if (this.jdkLevel == 0) { this.jdkLevel = JDK_LEVEL.get(getNd(), this.address); } return this.jdkLevel; }
public long getJdkLevel() { if (this.jdkLevel == 0) { this.jdkLevel = JDK_LEVEL.get(getNd(), this.address); } return this.jdkLevel; }
public List<IPath> getAllWorkspaceLocations() { final List<IPath> result = new ArrayList<>(); WORKSPACE_MAPPINGS.accept(getNd(), this.address, new Visitor<NdWorkspaceLocation>() { @Override public void visit(int index, NdWorkspaceLocation toVisit) { result.add(new Path(toVisit.getPath().getString())); } }); return result; }
public ClassFileToIndexConverter(NdResourceFile resourceFile) { this.resource = resourceFile; this.index = JavaIndex.getIndex(resourceFile.getNd()); }
public ClassFileToIndexConverter(NdResourceFile resourceFile) { this.resource = resourceFile; this.index = JavaIndex.getIndex(resourceFile.getNd()); }
@Override public String toString() { try { return FILENAME.get(getNd(), this.address).toString(); } catch (RuntimeException e) { // This is called most often from the debugger, so we want to return something meaningful even // if the code is buggy, the database is corrupt, or we don't have a read lock. return super.toString(); } }
/** * Returns the content of the JAR's MANIFEST.MF file, or null if either this isn't a .JAR file or it didn't contain * a MANIFEST.MF file. */ public IString getManifestContent() { return MANIFEST_CONTENT.get(getNd(), getAddress()); }
/** * Stores the content of the JAR's MANIFEST.MF file. This should only be invoked on resources that correspond to JAR * files. */ public void setManifestContent(char[] newContent) { MANIFEST_CONTENT.put(getNd(), getAddress(), newContent); }
/** * Returns the set of all leaf zip entries that are not .class files. Does not include non-empty directories * or .class files, but will contain all other zip entries from the original jar file. Returns the empty list * for non-jar files. */ public List<NdZipEntry> getZipEntries() { return ZIP_ENTRIES.asList(getNd(), getAddress()); }
/** * Returns the content of the JAR's MANIFEST.MF file, or null if either this isn't a .JAR file or it didn't contain * a MANIFEST.MF file. */ public IString getManifestContent() { return MANIFEST_CONTENT.get(getNd(), getAddress()); }
/** * Stores the content of the JAR's MANIFEST.MF file. This should only be invoked on resources that correspond to JAR * files. */ public void setManifestContent(char[] newContent) { MANIFEST_CONTENT.put(getNd(), getAddress(), newContent); }
public void setJdkLevel(long jdkLevel) { if (getJdkLevel() != jdkLevel) { JDK_LEVEL.put(getNd(), this.address, jdkLevel); } }
/** * Returns the set of all leaf zip entries that are not .class files. Does not include non-empty directories * or .class files, but will contain all other zip entries from the original jar file. Returns the empty list * for non-jar files. */ public List<NdZipEntry> getZipEntries() { return ZIP_ENTRIES.asList(getNd(), getAddress()); }
/** * Returns the absolute path to the java root for this .jar or .class file. If this is a .jar file, it returns its * own filename. */ public IString getPackageFragmentRoot() { IString javaRoot = JAVA_ROOT.get(getNd(), this.address); if (javaRoot.length() == 0) { return getLocation(); } return javaRoot; }
public NdZipEntry addZipEntry(String fileName) { NdZipEntry result = ZIP_ENTRIES.append(getNd(), getAddress()); result.setFilename(fileName); return result; } }
/** * Returns the absolute path to the java root for this .jar or .class file. If this is a .jar file, it returns its * own filename. */ public IString getPackageFragmentRoot() { IString javaRoot = JAVA_ROOT.get(getNd(), this.address); if (javaRoot.length() == 0) { return getLocation(); } return javaRoot; }