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


Java ProgressMonitorDialog.open方法代码示例

本文整理汇总了Java中org.eclipse.jface.dialogs.ProgressMonitorDialog.open方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressMonitorDialog.open方法的具体用法?Java ProgressMonitorDialog.open怎么用?Java ProgressMonitorDialog.open使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.dialogs.ProgressMonitorDialog的用法示例。


在下文中一共展示了ProgressMonitorDialog.open方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: okPressed

import org.eclipse.jface.dialogs.ProgressMonitorDialog; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void okPressed() {
	ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(getShell());
	progressMonitorDialog.open();
	progressMonitorDialog.getProgressMonitor().beginTask("connecting", IProgressMonitor.UNKNOWN);

	Properties serverProperties = new Properties();

	serverProperties.put(Context.PROVIDER_URL, serverName.getText());
	serverProperties.put(LdapImportSource.LDAP_BASE, ldapBase.getText());

	this.ldapImport.setProperties(serverProperties);
	try {
		this.ldapImport.connect();
		this.isInitFinished = true;
		progressMonitorDialog.close();
	} catch (CorruptedSourceException e) {
		progressMonitorDialog.close();
		this.isInitFinished = false;
		EMFStoreMessageDialog.showExceptionDialog("An exception occured", e);
	}

	this.isOkPressed = true;
	close();
}
 
开发者ID:edgarmueller,项目名称:emfstore-rest,代码行数:29,代码来源:LdapSourceDialog.java

示例2: performFinish

import org.eclipse.jface.dialogs.ProgressMonitorDialog; //导入方法依赖的package包/类
/**
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 * @return a boolean which indicates, if there are items selected or not.
 */
@Override
public boolean performFinish() {
	ArrayList<ImportItemWrapper> wrappedOrgUnits = ((AcUserImportPageTwo) this.getPages()[1]).getCheckedItems();
	if (wrappedOrgUnits.size() > 0) {
		ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(getShell());
		progressMonitorDialog.open();
		progressMonitorDialog.getProgressMonitor().beginTask("Importing users", IProgressMonitor.UNKNOWN);

		importController.importOrgUnits(wrappedOrgUnits);

		progressMonitorDialog.close();
		return true;
	} else {
		return false;
	}
}
 
开发者ID:edgarmueller,项目名称:emfstore-rest,代码行数:21,代码来源:AcUserImportWizard.java

示例3: execute

import org.eclipse.jface.dialogs.ProgressMonitorDialog; //导入方法依赖的package包/类
@Execute
	public void execute(
			IEclipseContext context,
			@Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
			@Named(IServiceConstants.ACTIVE_PART) final MContribution contribution)
			throws InvocationTargetException, InterruptedException {
		final IEclipseContext pmContext = context.createChild();

		ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
		dialog.open();
		dialog.run(true, true, new IRunnableWithProgress() {
			public void run(IProgressMonitor monitor)
					throws InvocationTargetException, InterruptedException {
				pmContext.set(IProgressMonitor.class.getName(), monitor);
				if (contribution != null) {
					Object clientObject = contribution.getObject();
//					ContextInjectionFactory.invoke(clientObject, Persist.class, //$NON-NLS-1$
//							pmContext, null);
				}
			}
		});
		
		pmContext.dispose();
	}
 
开发者ID:CrowdsourcingGeek,项目名称:CrowdBenchmark,代码行数:25,代码来源:SaveHandler.java

示例4: execute

import org.eclipse.jface.dialogs.ProgressMonitorDialog; //导入方法依赖的package包/类
@Execute
public void execute(
		IEclipseContext context,
		@Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
		@Named(IServiceConstants.ACTIVE_PART) final MContribution contribution)
		throws InvocationTargetException, InterruptedException {
	
	final IEclipseContext pmContext = context.createChild();

	ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
	dialog.open();
	dialog.run(true, true, new IRunnableWithProgress() {
		
		public void run(IProgressMonitor monitor)
				throws InvocationTargetException, InterruptedException {

			pmContext.set(IProgressMonitor.class.getName(), monitor);
			
			if (contribution != null) {
				Object clientObject = contribution.getObject();
				ContextInjectionFactory.invoke(clientObject, Persist.class,
						pmContext, null);
			}
		}
	});
	
	pmContext.dispose();
}
 
开发者ID:Pro-Nouns,项目名称:LinGUIne,代码行数:29,代码来源:SaveHandler.java

示例5: importImageToWorkspace

import org.eclipse.jface.dialogs.ProgressMonitorDialog; //导入方法依赖的package包/类
/**
 * This method will try to import an image to the work space at the editor,
 * and put it at the resources folder.
 * 
 * @param resourceImageData
 */
public void importImageToWorkspace(File newFile) {
	String fileName = newFile.getName();
	InputStream is = null;
	try {
		is = new FileInputStream(newFile);
	} catch (FileNotFoundException e1) {
		e1.printStackTrace();
	}
	selectedResource = null;
	
	if (is == null)
		return;
	try {
		IEditorPart activeEditor = getActiveEditor();
		if (activeEditor != null) {
			IEditorInput editorInput = activeEditor.getEditorInput();
			if ((editorInput instanceof IFileEditorInput)) {
				IFile editorFile = ((IFileEditorInput) editorInput)
						.getFile();
				IProject project = editorFile.getProject();
				if (project != null) {
					IFolder folder = project.getFolder("Resources");
					if (!folder.exists())
						folder.create(false, true, null);
					IFile file = folder.getFile(fileName);
					if (!file.exists()) {
						file.create(is, false,
								null);
						ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(
								null);
						progressMonitorDialog.open();
						project.refreshLocal(IResource.DEPTH_INFINITE,
								progressMonitorDialog.getProgressMonitor());
						progressMonitorDialog.close();
						
						// Refreshing the tree to show the new inputs.
						imagesTree.refreshInput();
						imagesTree.getTreeViewer().expandAll();
					}
				}
			}

		}
	} catch (CoreException e) {
	}
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:53,代码来源:ImageBrowserDialog.java

示例6: finish

import org.eclipse.jface.dialogs.ProgressMonitorDialog; //导入方法依赖的package包/类
public boolean finish() throws CoreException, IOException
{
	cuinaProject = CuinaCore.getCuinaProject(getProjectHandle());
	
	if (cuinaProject.getProject().exists()) return false;

	cuinaProject.create(null);

	ResourceProvider rp = cuinaProject.getService(ResourceProvider.class);
	
	ProgressMonitorDialog pmd = new ProgressMonitorDialog(getShell());
	pmd.open();
	rp.createFileStructure(pmd.getProgressMonitor());

	Ini ini = cuinaProject.getIni();
	ini.set("Game", "Title", cuinaProject.getName());
	
	return true;
}
 
开发者ID:TheWhiteShadow3,项目名称:cuina,代码行数:20,代码来源:ProjectWizard.java


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