Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 578871 - use ISchedulableOperation #19

Merged
merged 1 commit into from
May 2, 2022
Merged
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
4 changes: 2 additions & 2 deletions org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF
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.12.100.qualifier
Bundle-Version: 3.12.200.qualifier
Bundle-Activator: org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Expand All @@ -17,7 +17,7 @@ Export-Package: org.eclipse.ltk.core.refactoring,
org.eclipse.ltk.internal.core.refactoring.history;x-friends:="org.eclipse.ltk.ui.refactoring,org.eclipse.ltk.core.refactoring.tests",
org.eclipse.ltk.internal.core.refactoring.resource;x-friends:="org.eclipse.ltk.ui.refactoring,org.eclipse.ltk.core.refactoring.tests",
org.eclipse.ltk.internal.core.refactoring.resource.undostates;x-internal:=true
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.25.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.100,4.0.0)",
org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)",
org.eclipse.core.filebuffers;bundle-version="[3.5.0,4.0.0)",
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.ltk.core.refactoring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.ltk</groupId>
<artifactId>org.eclipse.ltk.core.refactoring</artifactId>
<version>3.12.100-SNAPSHOT</version>
<version>3.12.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.ISchedulableOperation;
import org.eclipse.core.runtime.jobs.ISchedulingRule;

import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;

Expand All @@ -40,7 +43,7 @@
import org.eclipse.ltk.core.refactoring.RefactoringStatus;


public class UndoableOperation2ChangeAdapter implements IUndoableOperation, IAdvancedUndoableOperation {
public class UndoableOperation2ChangeAdapter implements IUndoableOperation, IAdvancedUndoableOperation, ISchedulableOperation {
iloveeclipse marked this conversation as resolved.
Show resolved Hide resolved

private String fLabel;
private String fDescription;
Expand Down Expand Up @@ -348,7 +351,7 @@ private ExecuteResult executeChange(final IValidationCheckResultQuery query, IPr
monitor.done();
}
};
ResourcesPlugin.getWorkspace().run(runnable, pm);
ResourcesPlugin.getWorkspace().run(runnable, getSchedulingRule(), IWorkspace.AVOID_UPDATE, pm);
iloveeclipse marked this conversation as resolved.
Show resolved Hide resolved
return result;
}

Expand Down Expand Up @@ -390,4 +393,9 @@ private void clearActiveChange() {
fActiveChange.dispose();
fActiveChange= null;
}

@Override
public ISchedulingRule getSchedulingRule() {
return ResourcesPlugin.getWorkspace().getRoot();
}
}