Skip to content

Library Preferences page was improved. #1279

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

Merged
merged 1 commit into from
Dec 22, 2020
Merged
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,10 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.viewers.CellLabelProvider;
import org.eclipse.jface.viewers.CheckboxTreeViewer;
Expand Down Expand Up @@ -80,15 +83,27 @@ protected Control createContents(Composite parent) {
public boolean performOk() {
if (this.isJobRunning == false) {
this.isJobRunning = true;
new Job(Messages.ui_Adopting_arduino_libraries) {
Job job = new Job(Messages.ui_Adopting_arduino_libraries) {
@Override
protected IStatus run(IProgressMonitor monitor) {
MultiStatus status = new MultiStatus(Activator.getId(), 0, Messages.ui_installing_arduino_libraries,
null);
return LibraryManager.setLibraryTree(LibrarySelectionPage.this.libs, monitor, status);
}
}.schedule();
};
job.addJobChangeListener(new JobChangeAdapter() {

@Override
public void done(IJobChangeEvent event) {
LibrarySelectionPage.this.isJobRunning = false;
}

});
job.setUser(true);
job.schedule();
return true;
} else {
MessageDialog.openInformation(getShell(), "Library Manager", "Library Manager is busy. Please wait some time...");
}
return false;
}
Expand Down