public static void log(IStatus status) { getDefault().getLog().log(status); }
public static void log(IStatus status) { getDefault().getLog().log(status); }
public static void log(IStatus status) { getDefault().getLog().log(status); }
try { monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_updating_history, 60); final IFileStore historyStore= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(NAME_HISTORY_FOLDER); final String oldName= oldProject.getName(); final String newName= newProject.getName();
if (fHistoryStore.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) readRefactoringDescriptorProxies(fHistoryStore, fProjectName, set, start, end, new SubProgressMonitor(monitor, 80), RefactoringCoreMessages.RefactoringHistoryService_retrieving_history); final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER).getChild(RefactoringHistoryService.NAME_WORKSPACE_PROJECT); if (store.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) readRefactoringDescriptorProxies(store, null, set, start, end, new SubProgressMonitor(monitor, 80), RefactoringCoreMessages.RefactoringHistoryService_retrieving_history);
if (fHistoryStore.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) readRefactoringDescriptorProxies(fHistoryStore, fProjectName, set, start, end, new SubProgressMonitor(monitor, 80), RefactoringCoreMessages.RefactoringHistoryService_retrieving_history); final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER).getChild(RefactoringHistoryService.NAME_WORKSPACE_PROJECT); if (store.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) readRefactoringDescriptorProxies(store, null, set, start, end, new SubProgressMonitor(monitor, 80), RefactoringCoreMessages.RefactoringHistoryService_retrieving_history);
if (fHistoryStore.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) readRefactoringDescriptorProxies(fHistoryStore, fProjectName, set, start, end, new SubProgressMonitor(monitor, 80), RefactoringCoreMessages.RefactoringHistoryService_retrieving_history); final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER).getChild(RefactoringHistoryService.NAME_WORKSPACE_PROJECT); if (store.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) readRefactoringDescriptorProxies(store, null, set, start, end, new SubProgressMonitor(monitor, 80), RefactoringCoreMessages.RefactoringHistoryService_retrieving_history);
/** * Returns the refactoring history manager corresponding to the project * with the specified name. * * @param name * the name of the project, or <code>null</code> for the * workspace * @return the refactoring history manager, or <code>null</code> */ private RefactoringHistoryManager getManager(final String name) { final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(NAME_HISTORY_FOLDER); if (name != null && !"".equals(name)) {//$NON-NLS-1$ try { final IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(name); if (project.isAccessible()) { if (hasSharedRefactoringHistory(project)) { final URI uri= project.getLocationURI(); if (uri != null) return getManager(EFS.getStore(uri).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER), name); } else return getManager(store.getChild(name), name); } } catch (CoreException exception) { // Do nothing } } else return getManager(store.getChild(NAME_WORKSPACE_PROJECT), null); return null; }
/** * Returns the refactoring history manager corresponding to the project * with the specified name. * * @param name * the name of the project, or <code>null</code> for the * workspace * @return the refactoring history manager, or <code>null</code> */ private RefactoringHistoryManager getManager(final String name) { final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(NAME_HISTORY_FOLDER); if (name != null && !"".equals(name)) {//$NON-NLS-1$ try { final IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(name); if (project.isAccessible()) { if (hasSharedRefactoringHistory(project)) { final URI uri= project.getLocationURI(); if (uri != null) return getManager(EFS.getStore(uri).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER), name); } else return getManager(store.getChild(name), name); } } catch (CoreException exception) { // Do nothing } } else return getManager(store.getChild(NAME_WORKSPACE_PROJECT), null); return null; }
/** * Returns the refactoring history manager corresponding to the project * with the specified name. * * @param name * the name of the project, or <code>null</code> for the * workspace * @return the refactoring history manager, or <code>null</code> */ private RefactoringHistoryManager getManager(final String name) { final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(NAME_HISTORY_FOLDER); if (name != null && !"".equals(name)) {//$NON-NLS-1$ try { final IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(name); if (project.isAccessible()) { if (hasSharedRefactoringHistory(project)) { final URI uri= project.getLocationURI(); if (uri != null) return getManager(EFS.getStore(uri).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER), name); } else return getManager(store.getChild(name), name); } } catch (CoreException exception) { // Do nothing } } else return getManager(store.getChild(NAME_WORKSPACE_PROJECT), null); return null; }
monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_deleting_refactorings, 100); final String name= project.getName(); final IFileStore stateStore= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()); if (name.equals(NAME_WORKSPACE_PROJECT)) { final IFileStore metaStore= stateStore.getChild(NAME_HISTORY_FOLDER).getChild(name);
monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_deleting_refactorings, 100); final String name= project.getName(); final IFileStore stateStore= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()); if (name.equals(NAME_WORKSPACE_PROJECT)) { final IFileStore metaStore= stateStore.getChild(NAME_HISTORY_FOLDER).getChild(name);
monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_deleting_refactorings, 100); final String name= project.getName(); final IFileStore stateStore= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()); if (name.equals(NAME_WORKSPACE_PROJECT)) { final IFileStore metaStore= stateStore.getChild(NAME_HISTORY_FOLDER).getChild(name);
private IFileStore getHistoryStore(final IProject project) { final IPath location= RefactoringCorePlugin.getDefault().getStateLocation(); final IFileStore store= EFS.getLocalFileSystem().getStore(location).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER); try { if (project.isAccessible()) { if (RefactoringHistoryService.hasSharedRefactoringHistory(project)) { final URI uri= project.getLocationURI(); if (uri != null) return EFS.getStore(uri).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER); } else return store.getChild(project.getName()); } } catch (CoreException exception) { // Do nothing } return null; }
/** * Moves the project history from the old project to the new one. * * @param oldProject * the old project, which does not exist anymore * @param newProject * the new project, which already exists * @param monitor * the progress monitor to use */ private void moveHistory(final IProject oldProject, final IProject newProject, final IProgressMonitor monitor) { try { monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_updating_history, 60); final IFileStore historyStore= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(NAME_HISTORY_FOLDER); final String oldName= oldProject.getName(); final String newName= newProject.getName(); final IFileStore oldStore= historyStore.getChild(oldName); if (oldStore.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 10, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) { final IFileStore newStore= historyStore.getChild(newName); if (newStore.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 10, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) newStore.delete(EFS.NONE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)); oldStore.move(newStore, EFS.OVERWRITE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)); } } catch (CoreException exception) { RefactoringCorePlugin.log(exception); } finally { monitor.done(); } }
if (stamp >= 0) { final String name= proxy.getProject(); final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER); if (name != null && !"".equals(name)) { //$NON-NLS-1$ final IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(name);
/** * Moves the project history from the old project to the new one. * * @param oldProject * the old project, which does not exist anymore * @param newProject * the new project, which already exists * @param monitor * the progress monitor to use */ private void moveHistory(final IProject oldProject, final IProject newProject, final IProgressMonitor monitor) { try { monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_updating_history, 60); final IFileStore historyStore= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(NAME_HISTORY_FOLDER); final String oldName= oldProject.getName(); final String newName= newProject.getName(); final IFileStore oldStore= historyStore.getChild(oldName); if (oldStore.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 10, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) { final IFileStore newStore= historyStore.getChild(newName); if (newStore.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 10, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)).exists()) newStore.delete(EFS.NONE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)); oldStore.move(newStore, EFS.OVERWRITE, new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)); } } catch (CoreException exception) { RefactoringCorePlugin.log(exception); } finally { monitor.done(); } }
if (stamp >= 0) { final String name= proxy.getProject(); final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER); if (name != null && !"".equals(name)) { //$NON-NLS-1$ final IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (stamp >= 0) { final String name= proxy.getProject(); final IFileStore store= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(RefactoringHistoryService.NAME_HISTORY_FOLDER); if (name != null && !"".equals(name)) { //$NON-NLS-1$ final IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (uri != null) { try { final IFileStore history= EFS.getLocalFileSystem().getStore(RefactoringCorePlugin.getDefault().getStateLocation()).getChild(NAME_HISTORY_FOLDER); if (enable) { final IFileStore source= history.getChild(name);