public Properties getProductTranslation() { initValues(); URL transURL = null; if (customizationValue != null) transURL = FileLocator.find(customizationBundle, NL_DIR.append(customizationValue).removeFileExtension().addFileExtension(PROPERTIES_FILE_EXTENSION), null); if (transURL == null && InternalPlatform.DEBUG_PLUGIN_PREFERENCES) InternalPlatform.message("No preference translations found for product/file: " + customizationBundle.getSymbolicName() + '/' + customizationValue); //$NON-NLS-1$ return loadProperties(transURL); }
private static IPath getFilePath(String baseName) { IPath path = new Path(baseName.replace('.', '/'));//$NON-NLS-1$ path = path.addFileExtension("properties");//$NON-NLS-1$ return path; }
/** * Returns the path of the file in which to snapshot the sync information * for the given resource. Should only be called for the workspace root and * projects. */ public IPath getSyncInfoSnapshotLocationFor(IResource resource) { return getSyncInfoLocationFor(resource).addFileExtension(F_SNAP_EXTENSION); }
/** * Returns the path of the file in which to snapshot markers for the given * resource. Should only be called for the workspace root and projects. */ public IPath getMarkersSnapshotLocationFor(IResource resource) { return getMarkersLocationFor(resource).addFileExtension(F_SNAP_EXTENSION); }
/** * Returns the path of the file in which to snapshot the sync information * for the given resource. Should only be called for the workspace root and * projects. */ public IPath getSyncInfoSnapshotLocationFor(IResource resource) { return getSyncInfoLocationFor(resource).addFileExtension(F_SNAP_EXTENSION); }
/** * Returns the path of the file in which to snapshot the sync information * for the given resource. Should only be called for the workspace root and * projects. */ public IPath getSyncInfoSnapshotLocationFor(IResource resource) { return getSyncInfoLocationFor(resource).addFileExtension(F_SNAP_EXTENSION); }
/** * Returns the path of the file in which to snapshot markers for the given * resource. Should only be called for the workspace root and projects. */ public IPath getMarkersSnapshotLocationFor(IResource resource) { return getMarkersLocationFor(resource).addFileExtension(F_SNAP_EXTENSION); }
/** * Returns the path of the file in which to snapshot markers for the given * resource. Should only be called for the workspace root and projects. */ public IPath getMarkersSnapshotLocationFor(IResource resource) { return getMarkersLocationFor(resource).addFileExtension(F_SNAP_EXTENSION); }
protected void removeClassFile(IPath typePath, IContainer outputFolder) throws CoreException { if (typePath.lastSegment().indexOf('$') == -1) { // is not a nested type this.newState.removeQualifiedTypeName(typePath.toString()); // add dependents even when the type thinks it does not exist to be on the safe side if (JavaBuilder.DEBUG) System.out.println("Found removed type " + typePath); //$NON-NLS-1$ addDependentsOf(typePath, true); // when member types are removed, their enclosing type is structurally changed } IFile classFile = outputFolder.getFile(typePath.addFileExtension(SuffixConstants.EXTENSION_class)); if (classFile.exists()) { if (JavaBuilder.DEBUG) System.out.println("Deleting class file of removed type " + typePath); //$NON-NLS-1$ classFile.delete(IResource.FORCE, null); } }
static File getProgram(IContainer project) { IPath projectFile = ProjectFileAccessor.getProjectFile(project); String projectConfiguration = "Debug"; //$NON-NLS-1$ String[] frameworks = ProjectFileAccessor.getTargetFrameworks(project.getWorkspace().getRoot().getFile(projectFile).getLocation()); if (frameworks.length > 0) { return new File(project.getLocation().toFile().getAbsolutePath() + "/bin/" + projectConfiguration + "/" + frameworks[0] + "/" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + projectFile.removeFileExtension().addFileExtension("dll").lastSegment()); //$NON-NLS-1$ } return null; }
protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws CoreException { String fileName = new String(classFile.fileName()); // the qualified type name "p1/p2/A" IPath filePath = new Path(fileName); IContainer outputFolder = compilationUnit.sourceLocation.binaryFolder; IContainer container = outputFolder; if (filePath.segmentCount() > 1) { container = createFolder(filePath.removeLastSegments(1), outputFolder); filePath = new Path(filePath.lastSegment()); } IFile file = container.getFile(filePath.addFileExtension(SuffixConstants.EXTENSION_class)); writeClassFileContents(classFile, file, fileName, isTopLevelType, compilationUnit); // answer the name of the class file as in Y or Y$M return filePath.lastSegment().toCharArray(); }
protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws CoreException { String fileName = new String(classFile.fileName()); // the qualified type name "p1/p2/A" IPath filePath = new Path(fileName); IContainer outputFolder = compilationUnit.sourceLocation.binaryFolder; IContainer container = outputFolder; if (filePath.segmentCount() > 1) { container = createFolder(filePath.removeLastSegments(1), outputFolder); filePath = new Path(filePath.lastSegment()); } IFile file = container.getFile(filePath.addFileExtension(SuffixConstants.EXTENSION_class)); writeClassFileContents(classFile, file, fileName, isTopLevelType, compilationUnit); // answer the name of the class file as in Y or Y$M return filePath.lastSegment().toCharArray(); }
protected void updateModel() { // destination String comboText= fDestinationNamesCombo.getText(); IPath path= Path.fromOSString(comboText); if (path.segmentCount() > 0 && ensureTargetFileIsValid(path.toFile()) && path.getFileExtension() == null) // append .jar path= path.addFileExtension(JarPackagerUtil.JAR_EXTENSION); fJarPackage.setJarLocation(path); }
protected void updateModel() { // destination String comboText= fDestinationNamesCombo.getText(); IPath path= Path.fromOSString(comboText); if (path.segmentCount() > 0 && ensureTargetFileIsValid(path.toFile()) && path.getFileExtension() == null) // append .jar path= path.addFileExtension(JarPackagerUtil.JAR_EXTENSION); fJarPackage.setJarLocation(path); }
@Override public Properties getProductTranslation() { initValues(); URL transURL = null; if (customizationValue != null) transURL = FileLocator.find(customizationBundle, NL_DIR.append(customizationValue).removeFileExtension().addFileExtension(PROPERTIES_FILE_EXTENSION), null); if (transURL == null && InternalPlatform.DEBUG_PLUGIN_PREFERENCES) InternalPlatform.message("No preference translations found for product/file: " + customizationBundle.getSymbolicName() + '/' + customizationValue); //$NON-NLS-1$ return loadProperties(transURL); }
public Properties getProductTranslation() { initValues(); URL transURL = null; if (customizationValue != null) transURL = FileLocator.find(customizationBundle, NL_DIR.append(customizationValue).removeFileExtension().addFileExtension(PROPERTIES_FILE_EXTENSION), null); if (transURL == null && InternalPlatform.DEBUG_PLUGIN_PREFERENCES) InternalPlatform.message("No preference translations found for product/file: " + customizationBundle.getSymbolicName() + '/' + customizationValue); //$NON-NLS-1$ return loadProperties(transURL); }
public Properties getProductTranslation() { initValues(); URL transURL = null; if (customizationValue != null) transURL = FileLocator.find(customizationBundle, NL_DIR.append(customizationValue).removeFileExtension().addFileExtension(PROPERTIES_FILE_EXTENSION), null); if (transURL == null && InternalPlatform.DEBUG_PLUGIN_PREFERENCES) InternalPlatform.message("No preference translations found for product/file: " + customizationBundle.getSymbolicName() + '/' + customizationValue); //$NON-NLS-1$ return loadProperties(transURL); }
/** * Stores the widget values in the JAR package. */ @Override protected void updateModel() { super.updateModel(); String comboText= fAntScriptNamesCombo.getText(); IPath path= Path.fromOSString(comboText); if (path.segmentCount() > 0 && ensureAntScriptFileIsValid(path.toFile()) && path.getFileExtension() == null) path= path.addFileExtension(ANTSCRIPT_EXTENSION); fAntScriptLocation= getAbsoluteLocation(path); }
/** * Stores the widget values in the JAR package. */ @Override protected void updateModel() { super.updateModel(); String comboText= fAntScriptNamesCombo.getText(); IPath path= Path.fromOSString(comboText); if (path.segmentCount() > 0 && ensureAntScriptFileIsValid(path.toFile()) && path.getFileExtension() == null) path= path.addFileExtension(ANTSCRIPT_EXTENSION); fAntScriptLocation= getAbsoluteLocation(path); }
/** * Stores the widget values in the JAR package. */ @Override protected void updateModel() { super.updateModel(); String comboText= fAntScriptNamesCombo.getText(); IPath path= Path.fromOSString(comboText); if (path.segmentCount() > 0 && ensureAntScriptFileIsValid(path.toFile()) && path.getFileExtension() == null) path= path.addFileExtension(ANTSCRIPT_EXTENSION); fAntScriptLocation= getAbsoluteLocation(path); }