本文整理汇总了Java中org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob类的典型用法代码示例。如果您正苦于以下问题:Java LoadMetadataRepositoryJob类的具体用法?Java LoadMetadataRepositoryJob怎么用?Java LoadMetadataRepositoryJob使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LoadMetadataRepositoryJob类属于org.eclipse.equinox.p2.ui包,在下文中一共展示了LoadMetadataRepositoryJob类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doExecute
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
@Override
protected void doExecute(LoadMetadataRepositoryJob job) {
if (hasNoRepos) {
MessageDialog.openInformation(null, "Update Yamcs Studio", "Could not check for updates since no repository is configured");
return;
}
UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
// check for updates
operation.resolveModal(null);
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
if (UpdateSingleIUWizard.validFor(operation)) {
// Special case for only updating a single root
UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
WizardDialog dialog = new WizardDialog(getShell(), wizard);
dialog.create();
dialog.open();
} else {
// Open the normal version of the update wizard
getProvisioningUI().openUpdateWizard(false, operation, job);
}
}
}
示例2: doExecute
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
protected void doExecute(LoadMetadataRepositoryJob job) {
if (hasNoRepos) {
if (getProvisioningUI().getPolicy().getRepositoriesVisible()) {
boolean goToSites = MessageDialog.openQuestion(getShell(), Messages.UpdateHandler_NoUpdatesTitle, Messages.UpdateHandler_NoUpdatesMessage);
if (goToSites) {
getProvisioningUI().manipulateRepositories(getShell());
}
}
return;
}
// Report any missing repositories.
job.reportAccumulatedStatus();
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
getProvisioningUI().openUpdateWizard(false, operation, job);
}
}
示例3: doExecute
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
protected void doExecute(LoadMetadataRepositoryJob job) {
if (hasNoRepos) {
System.out.println("no repos");
return;
}
UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
// check for updates
operation.resolveModal(null);
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
if (UpdateSingleIUWizard.validFor(operation)) {
// Special case for only updating a single root
UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
WizardDialog dialog = new WizardDialog(getShell(), wizard);
dialog.create();
dialog.open();
} else {
// Open the normal version of the update wizard
getProvisioningUI().openUpdateWizard(false, operation, job);
}
}
}
示例4: doExecute
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
@Override
protected void doExecute(final LoadMetadataRepositoryJob job) {
final ProvisioningUI provisioningUI = getProvisioningUI();
final Policy policy = provisioningUI.getPolicy();
if (hasNoRepos) {
if (policy.getRepositoriesVisible()) {
final boolean goToSites = MessageDialog.openQuestion(
getShell(),
ProvSDKMessages.UpdateHandler_NoSitesTitle,
ProvSDKMessages.UpdateHandler_NoSitesMessage);
if (goToSites) {
provisioningUI.manipulateRepositories(getShell());
}
}
return;
}
// Report any missing repositories.
job.reportAccumulatedStatus();
if (policy.continueWorkingWithOperation(operation, getShell())) {
provisioningUI.openUpdateWizard(false, operation, job);
}
}
示例5: doExecute
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
protected void doExecute(LoadMetadataRepositoryJob job) {
if (hasNoRepos) {
return;
}
UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
// check for updates
operation.resolveModal(null);
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
if (UpdateSingleIUWizard.validFor(operation)) {
// Special case for only updating a single root
UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
WizardDialog dialog = new WizardDialog(getShell(), wizard);
dialog.create();
dialog.open();
} else {
// Open the normal version of the update wizard
getProvisioningUI().openUpdateWizard(false, operation, job);
}
}
}
示例6: doExecute
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
protected void doExecute(LoadMetadataRepositoryJob job){
if (hasNoRepos) {
return;
}
UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
// check for updates
operation.resolveModal(null);
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
if (UpdateSingleIUWizard.validFor(operation)) {
// Special case for only updating a single root
UpdateSingleIUWizard wizard =
new UpdateSingleIUWizard(getProvisioningUI(), operation);
WizardDialog dialog = new WizardDialog(getShell(), wizard);
dialog.create();
dialog.open();
} else {
// Open the normal version of the update wizard
getProvisioningUI().openUpdateWizard(false, operation, job);
}
}
}
示例7: doExecuteAndLoad
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
void doExecuteAndLoad() {
if (preloadRepositories()) {
//cancel any load that is already running
Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
setLoadJobProperties(loadJob);
if (waitForPreload()) {
loadJob.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
if (PlatformUI.isWorkbenchRunning())
if (event.getResult().isOK()) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
doExecute(loadJob);
}
});
}
}
});
loadJob.setUser(true);
loadJob.schedule();
} else {
loadJob.setSystem(true);
loadJob.setUser(false);
loadJob.schedule();
doExecute(null);
}
} else {
doExecute(null);
}
}
示例8: doExecute
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
@Override
protected void doExecute(LoadMetadataRepositoryJob job) {
try {
// Save the global settings that we will modify
saveSettings();
// Modify those settings
prepareWizardSettings();
// Boilerplate for opening the wizard
InstallWizard wizard = new InstallWizard(getProvisioningUI(), null,
null, job);
WizardDialog dialog = new ProvisioningWizardDialog(getShell(), wizard);
dialog.create();
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
IProvHelpContextIds.INSTALL_WIZARD);
prepareWizard(wizard);
// Open it
dialog.open();
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
// Restore the settings which we touched
restoreSettings();
}
}
示例9: setLoadJobProperties
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
protected void setLoadJobProperties(Job loadJob) {
super.setLoadJobProperties(loadJob);
// If we are doing a background load, we do not wish to authenticate, as the
// user is unaware that loading was needed
if (!waitForPreload()) {
loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
}
}
示例10: doExecuteAndLoad
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
void doExecuteAndLoad() {
if (preloadRepositories()) {
//cancel any load that is already running
Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
setLoadJobProperties(loadJob);
if (waitForPreload()) {
loadJob.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
if (PlatformUI.isWorkbenchRunning())
if (event.getResult().isOK()) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
doExecute(loadJob);
}
});
}
}
});
loadJob.setUser(true);
loadJob.schedule();
} else {
loadJob.setSystem(true);
loadJob.setUser(false);
loadJob.schedule();
doExecute(null);
}
} else {
doExecute(null);
}
}
示例11: doExecute
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
@Override
protected void doExecute(LoadMetadataRepositoryJob job) {
// TODO Auto-generated method stub
if (hasNoRepos) {
P2UpdateUtil.openConnectErrorInfoDialog(getShell(), P2UpdateUtil.INFO_TYPE_CHECK);
return;
}
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
UpdateWizard wizard = new UpdateWizard(getProvisioningUI(), operation, operation.getSelectedUpdates());
TSWizardDialog dialog = new TSWizardDialog(getShell(), wizard);
dialog.create();
dialog.open();
}
}
示例12: doExecuteAndLoad
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
void doExecuteAndLoad() {
if (preloadRepositories()) {
//cancel any load that is already running
Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
setLoadJobProperties(loadJob);
if (waitForPreload()) {
loadJob.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
if (PlatformUI.isWorkbenchRunning())
if (event.getResult().isOK()) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
doExecute(loadJob);
}
});
}
}
});
loadJob.setUser(true);
loadJob.schedule();
} else {
loadJob.setSystem(true);
loadJob.setUser(false);
loadJob.schedule();
doExecute(null);
}
} else {
doExecute(null);
}
}
示例13: setLoadJobProperties
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
protected void setLoadJobProperties(Job loadJob){
super.setLoadJobProperties(loadJob);
// If we are doing a background load, we do not wish to authenticate, as the
// user is unaware that loading was needed
if (!waitForPreload()) {
loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER,
Boolean.toString(true));
loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS,
Boolean.toString(true));
}
}
示例14: doExecuteAndLoad
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
void doExecuteAndLoad(){
if (preloadRepositories()) {
// cancel any load that is already running
Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
final LoadMetadataRepositoryJob loadJob =
new LoadMetadataRepositoryJob(getProvisioningUI());
setLoadJobProperties(loadJob);
if (waitForPreload()) {
loadJob.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event){
if (PlatformUI.isWorkbenchRunning())
if (event.getResult().isOK()) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run(){
doExecute(loadJob);
}
});
}
}
});
loadJob.setUser(true);
loadJob.schedule();
} else {
loadJob.setSystem(true);
loadJob.setUser(false);
loadJob.schedule();
doExecute(null);
}
} else {
doExecute(null);
}
}
示例15: setLoadJobProperties
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
protected void setLoadJobProperties(Job loadJob) {
loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
}