/** * {@inheritDoc} */ @Override protected Path getDefaultStorageDirPath() { return Paths.get(Platform.getLocation().toString(), getStorageDefaultFolder()).toAbsolutePath(); }
/** * Return whether or not the specifed location is a prefix * of the root. */ private boolean isPrefixOfRoot(IPath locationPath) { return Platform.getLocation().isPrefixOf(locationPath); }
private IPath getOldPath() { return Platform.getLocation().append(new Path(".metadata/.plugins/org.eclipse.core.runtime/.settings")); //$NON-NLS-1$ } }
/** * Return the location for the project. If we are using defaults then return * the workspace root so that core creates it with default values. * * @return String */ public String getProjectLocation() { if (isDefault()) { return Platform.getLocation().toOSString(); } return locationPathField.getText(); } }
protected String getDefaultPath(String name) { final IPath path= Platform.getLocation().append(name); return path.toOSString(); }
public IPath getLocation() { if (isUseDefaultSelected()) { return Platform.getLocation(); } return Path.fromOSString(fLocation.getText().trim()); }
protected String getDefaultPath(String name) { final IPath path= Platform.getLocation().append(name); return path.toOSString(); }
protected String getDefaultPath(String name) { final IPath path= Platform.getLocation().append(name); return path.toOSString(); }
protected String getDefaultPath(String name) { final IPath path = Platform.getLocation().append(name); return path.toOSString(); }
/** * Returns the path of the location chosen by the user. According to the user input, the path either points to the * workspace or to a valid user specified location on the filesystem. * * @return The path of the location chosen by the user. Is never <code>null</code>. */ public IPath getLocationPath() { if(isInWorkspace()) { return Platform.getLocation(); } return Path.fromOSString(locationCombo.getText().trim()); }
protected WorkspaceRoot(IPath path, Workspace container) { super(path, container); Assert.isTrue(path.equals(Path.ROOT)); workspaceLocation = FileUtil.canonicalPath(Platform.getLocation()); Assert.isNotNull(workspaceLocation); }
protected WorkspaceRoot(IPath path, Workspace container) { super(path, container); Assert.isTrue(path.equals(Path.ROOT)); workspaceLocation = FileUtil.canonicalPath(Platform.getLocation()); Assert.isNotNull(workspaceLocation); }
public IPath getLocation() { if (isUseDefaultSelected()) { return Platform.getLocation(); } return Path.fromOSString(fLocation.getText().trim()); }
public IPath getLocation() { if (isInWorkspace()) { return Platform.getLocation(); } return Path.fromOSString(fLocation.getText().trim()); }
public IPath getLocation() { if (isUseDefaultSelected()) { return Platform.getLocation(); } return Path.fromOSString(this.location.getText().trim()); }
protected WorkspaceRoot(IPath path, Workspace container) { super(path, container); Assert.isTrue(path.equals(Path.ROOT)); workspaceLocation = FileUtil.canonicalPath(Platform.getLocation()); Assert.isNotNull(workspaceLocation); }
public boolean isInWorkspace() { final String location= fLocationGroup.getLocation().toOSString(); IPath projectPath= Path.fromOSString(location); return Platform.getLocation().isPrefixOf(projectPath); }
@Override protected boolean validatePage() { if (super.validatePage()) { IPath locationPath = getLocationPath(); genModelProjectLocation = Platform.getLocation().equals(locationPath) ? null : locationPath; IPath projectPath = getProjectHandle().getFullPath(); genModelContainerPath = projectPath.append("src"); return true; } else { return false; } } };
public static void createProject(IProject project, IPath location, IProgressMonitor monitor) throws CoreException { if (!Platform.getLocation().equals(location)) { IProjectDescription desc = project.getWorkspace() .newProjectDescription(project.getName()); desc.setLocation(location); project.create(desc, monitor); } else project.create(monitor); }
public static void createProject(IProject project, IPath location, IProgressMonitor monitor) throws CoreException { if (!Platform.getLocation().equals(location)) { IProjectDescription desc = project.getWorkspace().newProjectDescription(project.getName()); desc.setLocation(location); project.create(desc, monitor); } else project.create(monitor); }