当前位置: 首页>>代码示例>>Java>>正文


Java LoadMetadataRepositoryJob类代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:24,代码来源:UpdateHandler.java

示例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);
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:UpdateHandler.java

示例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);
		}
	}
}
 
开发者ID:tmfev,项目名称:IDRT-Import-and-Mapping-Tool,代码行数:22,代码来源:UpdateHandler.java

示例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);
	}
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:27,代码来源:UpdateHandler.java

示例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);
		}
	}
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:21,代码来源:UpdateHandler.java

示例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);
		}
	}
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:22,代码来源:UpdateHandler.java

示例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);
    }
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:33,代码来源:PreloadingRepositoryHandler.java

示例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();
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:31,代码来源:UpdateDetailsPresenter.java

示例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));
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:10,代码来源:InstallNewSoftwareHandler.java

示例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);
	}
}
 
开发者ID:tmfev,项目名称:IDRT-Import-and-Mapping-Tool,代码行数:34,代码来源:PreloadingRepositoryHandler.java

示例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();
	}
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:16,代码来源:CheckUpdateHandler.java

示例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);
	}
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:33,代码来源:PreloadingRepositoryHandler.java

示例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));
	}
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:12,代码来源:InstallNewSoftwareHandler.java

示例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);
	}
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:34,代码来源:PreloadingRepositoryHandler.java

示例15: setLoadJobProperties

import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; //导入依赖的package包/类
protected void setLoadJobProperties(Job loadJob) {
    loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:4,代码来源:PreloadingRepositoryHandler.java


注:本文中的org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。