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


Java Status.OK_STATUS属性代码示例

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


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

示例1: resfreshFileInContainer

/**
 * @param folder
 * @param filetorefresh
 * @return
 * @throws CoreException
 * @throws InterruptedException
 */
public static IResource resfreshFileInContainer(IContainer folder, String filetorefresh)
		throws CoreException, InterruptedException {
	final IResource buildfile = find(folder, filetorefresh);
	Job job = new WorkspaceJob("Refresh folders") {
		public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
			if (buildfile != null && buildfile.exists()) {
				try {
					buildfile.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
				} catch (CoreException e) {
					ResourceManager.logException(e);
				}
			}
			return Status.OK_STATUS;
		}
	};
	job.setUser(true);
	job.schedule();

	return buildfile;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:27,代码来源:ResourceManager.java

示例2: run

@Override
protected IStatus run(IProgressMonitor monitor) {
    SubMonitor pm = SubMonitor.convert(
            monitor, Messages.commitPartDescr_commiting, 2);

    Log.log(Log.LOG_INFO, "Applying diff tree to db"); //$NON-NLS-1$
    pm.newChild(1).subTask(Messages.commitPartDescr_modifying_db_model); // 1
    pm.newChild(1).subTask(Messages.commitPartDescr_exporting_db_model); // 2

    try {
        Collection<TreeElement> checked = new TreeFlattener()
                .onlySelected()
                .onlyEdits(dbProject.getDbObject(), dbRemote.getDbObject())
                .flatten(tree);
        new ProjectUpdater(dbRemote.getDbObject(), dbProject.getDbObject(),
                checked, proj).updatePartial();
        monitor.done();
    } catch (IOException | CoreException e) {
        return new Status(Status.ERROR, PLUGIN_ID.THIS,
                Messages.ProjectEditorDiffer_commit_error, e);
    }
    if (monitor.isCanceled()) {
        return Status.CANCEL_STATUS;
    }
    return Status.OK_STATUS;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:26,代码来源:ProjectEditorDiffer.java

示例3: run

@Override
protected IStatus run(IProgressMonitor monitor) {
	try {
		if (editor!=null) editor.setSafeEnabled(false);
	    scannable.setPosition(value); // Blocking call
	    if (editor!=null && value instanceof Number) {
		editor.setSafeValue(((Number)value).doubleValue());
	    }
	    return Status.OK_STATUS;

	} catch (Exception e) {
		editor.setSafeText(e.getMessage());
		logger.error("Cannot set position!", e);
	    return Status.CANCEL_STATUS;

	} finally {
		editor.setSafeEnabled(true);
	}
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:19,代码来源:ControlValueJob.java

示例4: run

@Override
protected IStatus run(IProgressMonitor monitor)
{
	boolean more = false;
	do
	{
		IModel[] changedModels = null;
		synchronized( models )
		{
			changedModels = models.toArray(new IModel[models.size()]);
			models.clear();
		}
		fireModelProviderEvent(new ModelProviderEvent(this, IModelProviderEvent.MODELS_CHANGED, new IModel[0],
			new IModel[0], changedModels));
		synchronized( models )
		{
			more = !models.isEmpty();
		}
	}
	while( more );
	return Status.OK_STATUS;
}
 
开发者ID:equella,项目名称:Equella,代码行数:22,代码来源:WorkspaceModelManager.java

示例5: createJob

/**
 * @param jobname
 * @param tasks
 * @return
 */
public static Job createJob(String jobname, List<UITask.Task> tasks) {
	Job job = new Job(jobname) {
		@Override
		protected IStatus run(IProgressMonitor monitor) {
			SubMonitor subMonitor = SubMonitor.convert(monitor, tasks.size());
			for (UITask.Task task : tasks) {
				try {
					subMonitor.setTaskName(task.getSummary());
					workOnTask(task, subMonitor.split(1));
				} catch (Exception e) {
					return Status.CANCEL_STATUS;
				}
			}
			return Status.OK_STATUS;
		}
	};
	job.setUser(true);
	return job;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:24,代码来源:UITask.java

示例6: performFinish

public boolean performFinish() {
	final Collection<ProjectDescriptor> projectDescriptors = getProjectDescriptors();
	
	WorkspaceJob job = new WorkspaceJob("Unzipping Projects") {
		@Override
		public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
			monitor.beginTask("Unzipping Projects", projectDescriptors.size());
			//System.out.println("Unzipping projects...");
			for ( ProjectDescriptor desc : projectDescriptors ) {
				unzipProject(desc, monitor);
				monitor.worked(1);
			}
			//System.out.println("Projects unzipped");
			return Status.OK_STATUS;
		}
	};
	job.setRule(ResourcesPlugin.getWorkspace().getRoot());
	job.schedule();
	return true;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:20,代码来源:AbstractExampleWizard.java

示例7: run

@Override
public void run(IMarker marker) {
	Job job = new WorkspaceJob("GW4E Fix Job") {
		@Override
		public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
			fix(marker, monitor);
			return Status.OK_STATUS;
		}
	};
	job.setRule(marker.getResource().getProject());
	job.setUser(true);
	job.schedule();
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:13,代码来源:MissingPoliciesForFileMarkerResolution.java

示例8: validate

@Override
public IStatus validate(Object value) {
	if (value instanceof String) {
		String s = (String) value;
		if (s.length() == 0) {
			return ValidationStatus.error("列名不能为空!");
		} else if (s.length() > 32) {
			return ValidationStatus.error("列名长度不能超过32位!");
		} else {
			return Status.OK_STATUS;
		}
	} else {
		throw new RuntimeException("not supposed!");
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:15,代码来源:ColumnDialog.java

示例9: run

@Override
public void run(IMarker marker) {
	IWorkbenchWindow ww=  PlatformUI.getWorkbench().getActiveWorkbenchWindow();
	Job job = new WorkspaceJob("GW4E Synchronization Job") {
		@Override
		public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
			 fix(marker,ww,monitor);
			 return Status.OK_STATUS;
		}
	};
	job.setRule(marker.getResource().getProject());
	job.setUser(true);
	job.schedule();
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:14,代码来源:MissingBuildPoliciesFileMarkerResolution.java

示例10: run

@Override
protected IStatus run(IProgressMonitor monitor) {
    BuildConfiguration buildConfig = CorePlugin.configurationManager()
            .loadBuildConfiguration(new File(project.getRawLocationURI()));

    RunConfiguration runConfiguration = CorePlugin.configurationManager().createDefaultRunConfiguration(buildConfig);

    BuildLauncher launcher = CorePlugin.gradleWorkspaceManager().getGradleBuild(buildConfig)
                    .newBuildLauncher(runConfiguration, CharStreams.nullWriter(), 
                                    getTransientRequestAttributes(GradleConnector.newCancellationTokenSource().token(), monitor));
    launcher.forTasks(":" + project.getName() + ":gfBundle").run();

    return Status.OK_STATUS;
}
 
开发者ID:gluonhq,项目名称:ide-plugins,代码行数:14,代码来源:ExecuteUploadFunction.java

示例11: convertStatus

public static IStatus convertStatus ( final String pluginId, final String message, final Throwable e )
{
    if ( e == null )
    {
        return Status.OK_STATUS;
    }

    if ( e instanceof CoreException )
    {
        return ( (CoreException)e ).getStatus ();
    }

    return new Status ( IStatus.ERROR, pluginId, message, e );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:14,代码来源:StatusHelper.java

示例12: run

@Override
protected IStatus run(IProgressMonitor monitor) {
    if (monitor.isCanceled()) {
        return Status.CANCEL_STATUS;
    }
    monitor.beginTask(Messages.UsageReport_Querying_Enablement, 2);

    if (monitor.isCanceled()) {
        return Status.CANCEL_STATUS;
    }
    monitor.worked(1);
    try {
        lockToAskUser.lock();

        if (mainPrefs.getBoolean(USAGE_REPORT_PREF.ASK_USER_USAGEREPORT_ID)) {
            if (monitor.isCanceled()) {
                return Status.CANCEL_STATUS;
            }
            askUser();
        }
    } finally {
        lockToAskUser.unlock();
    }
    report();
    monitor.worked(2);
    monitor.done();

    return Status.OK_STATUS;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:29,代码来源:UsageReporter.java

示例13: triggerProjectRebuild

@Override
public void triggerProjectRebuild() {
	WorkspaceJob build = new WorkspaceJob("rebuild") {

		@Override
		public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
			ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, monitor);
			return Status.OK_STATUS;
		}
	};
	build.schedule();
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:12,代码来源:DataModelImpl.java

示例14: triggerBuild

public void triggerBuild(IProject project) throws CoreException {
	if (isVisuflowNatureEnabled(project) && ResourcesPlugin.getWorkspace().isAutoBuilding()) {
		WorkspaceJob fullBuild = new WorkspaceJob("Full build for " + project.getName()) {
			@Override
			public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
				project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
				return Status.OK_STATUS;
			}
		};
		fullBuild.schedule();
	}
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:12,代码来源:ProjectListener.java

示例15: submitRecordCountJob

public void submitRecordCountJob() {
	Job job = new Job(Messages.FETCHING_TOTAL_NUMBER_OF_RECORDS) {
		@Override
		protected IStatus run(IProgressMonitor monitor) {
			
			Display.getDefault().asyncExec(new Runnable() {
				
				@Override
				public void run() {
					statusManager.getStatusLineManager().getProgressMonitor().beginTask(Messages.FETCHING_TOTAL_NUMBER_OF_RECORDS, IProgressMonitor.UNKNOWN);
				}
			});
			
			final StatusMessage status = dataViewerAdapter.fetchRowCount();

			Display.getDefault().asyncExec(new Runnable() {
				@Override
				public void run() {
					statusManager.getStatusLineManager().getProgressMonitor().done();
					statusManager.setStatus(status);
					statusManager.enableJumpPagePanel(true);
					actionFactory.getAction(ResetSortAction.class.getName()).setEnabled(false);
					actionFactory.getAction(ClearFilterAction.class.getName()).setEnabled(false);
				}
			});
			return Status.OK_STATUS;
		}
	};

	job.schedule();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:31,代码来源:DebugDataViewer.java


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