Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.ltk.core.refactoring
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ltk.core.refactoring; singleton:=true
Bundle-Version: 3.15.200.qualifier
Bundle-Version: 3.15.300.qualifier
Bundle-Activator: org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SubMonitor;

import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;

import org.eclipse.core.filebuffers.FileBuffers;
Expand Down Expand Up @@ -120,11 +123,21 @@ public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws Core

@Override
public RefactoringStatus checkFinalConditions(IProgressMonitor pm, CheckConditionsContext context) throws CoreException, OperationCanceledException {
pm.beginTask("", 1); //$NON-NLS-1$
SubMonitor subMonitor= SubMonitor.convert(pm, fResources.length);
try {
RefactoringStatus result= new RefactoringStatus();

boolean lightweightAutoRefresh= Platform.getPreferencesService().getBoolean(ResourcesPlugin.PI_RESOURCES,
ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, false, null);

for (IResource resource : fResources) {
if (lightweightAutoRefresh && resource.isAccessible()) {
try {
resource.refreshLocal(IResource.DEPTH_INFINITE, subMonitor.split(1));
} catch (CoreException e) {
// Refresh failed; fall through to the sync check, which reports the warning
}
}
if (!isSynchronizedExcludingLinkedResources(resource)) {
String pathLabel= BasicElementLabels.getPathLabel(resource.getFullPath(), false);

Expand Down
Loading