本文整理汇总了Java中org.eclipse.ui.progress.IProgressConstants类的典型用法代码示例。如果您正苦于以下问题:Java IProgressConstants类的具体用法?Java IProgressConstants怎么用?Java IProgressConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IProgressConstants类属于org.eclipse.ui.progress包,在下文中一共展示了IProgressConstants类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createInitialLayout
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
left.addView(IPageLayout.ID_PROJECT_EXPLORER);
left.addPlaceholder(IPageLayout.ID_RES_NAV);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addPlaceholder(TemplatesView.ID);
bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
开发者ID:angelozerr,项目名称:angular-eclipse,代码行数:24,代码来源:AngularPerspectiveFactory.java
示例2: doFinish
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
/**
* Called when the job is finished.
*/
protected void doFinish()
{
// setProperty(IProgressConstants.ICON_PROPERTY, image);
if (AbstractJob.isModal(this))
{
Display.getDefault().asyncExec(new Runnable() {
public void run()
{
getJobCompletedAction().run();
}
});
} else
{
setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
setProperty(IProgressConstants.ACTION_PROPERTY, getJobCompletedAction());
}
}
开发者ID:tlaplus,项目名称:tlaplus,代码行数:21,代码来源:AbstractJob.java
示例3: createInitialLayout
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
left.addView(IPageLayout.ID_PROJECT_EXPLORER);
left.addPlaceholder(IPageLayout.ID_RES_NAV);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addPlaceholder(TemplatesView.ID);
bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
开发者ID:angelozerr,项目名称:typescript.java,代码行数:24,代码来源:TypeScriptPerspectiveFactory.java
示例4: addFolders
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
protected void addFolders(IPageLayout layout) {
IFolderLayout leftFolder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.2, //$NON-NLS-1$
layout.getEditorArea());
leftFolder.addView(DLTKUIPlugin.ID_SCRIPT_EXPLORER);
leftFolder.addView("org.eclipse.dltk.testing.ResultView"); //$NON-NLS-1$
leftFolder.addPlaceholder("org.eclipse.dltk.ui.TypeHierarchy"); //$NON-NLS-1$
leftFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
IFolderLayout bottomFolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, //$NON-NLS-1$
layout.getEditorArea());
bottomFolder.addView(IPageLayout.ID_PROBLEM_VIEW);
bottomFolder.addView(IPageLayout.ID_TASK_LIST);
bottomFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
bottomFolder.addPlaceholder("org.eclipse.dltk.callhierarchy.view"); //$NON-NLS-1$
bottomFolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottomFolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
}
开发者ID:JuliaComputing,项目名称:JuliaDT,代码行数:19,代码来源:JuliaPerspective.java
示例5: addDownloadJob
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
protected void addDownloadJob(DownloadJob downloadJob) {
if (downloadJob != null) {
// This is a non-user job, so make sure that it has no presence in the
// Progress View
downloadJob.setSystem(true);
downloadJob.addJobChangeListener(removeJobOnCompleteListener);
// If the job returns an ERROR status, make sure that it does not show
// a modal dialog with the ERROR information; we want a silent failure
downloadJob.setProperty(
IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, true);
synchronized (downloadJobs) {
downloadJob.schedule();
downloadJobs.add(downloadJob);
}
}
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:21,代码来源:FeatureUpdateManager.java
示例6: run
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
@Override
protected IStatus run(IProgressMonitor monitor) {
IStatus jobStatus = Status.OK_STATUS;
try {
jobStatus = untar.run(monitor);
} catch (InvocationTargetException e) {
jobStatus = new Status(Status.ERROR, CorePlugin.PLUGIN_ID, "Invocation Target Exception", e);
}
setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
setProperty(IProgressConstants.ACTION_PROPERTY, getViewStatusAction(jobStatus));
maybeFireCompletedAction(jobStatus);
monitor.done();
return jobStatus;
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:17,代码来源:UntarJob.java
示例7: run
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
/**
* Run the unzip job using the provided monitor.
*/
@Override
protected IStatus run(IProgressMonitor monitor) {
IStatus jobStatus = Status.OK_STATUS;
try {
jobStatus = unzip.run(monitor);
} catch (InvocationTargetException e) {
jobStatus = new Status(Status.ERROR, CorePlugin.PLUGIN_ID, "Invocation Target Exception", e);
}
setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
setProperty(IProgressConstants.ACTION_PROPERTY, getViewStatusAction(jobStatus));
maybeFireCompletedAction(jobStatus);
monitor.done();
return jobStatus;
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:20,代码来源:UnzipJob.java
示例8: CustomDynamicSpotterRunJob
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
/**
* Create a new job for the given project and job id.
*
* @param project
* The project the job is for
* @param jobId
* The job id of the new job
* @param timestamp
* The timestamp when the job was initiated
*/
public CustomDynamicSpotterRunJob(ConfigAlternative alternative, long jobId)
{
super("DynamicSpotter Diagnosis '" + alternative.getName() + "'");
this.project = alternative.getProject();
this.alternative = alternative;
this.jobId = jobId;
this.silentCancel = false;
this.timestamp = System.currentTimeMillis();
ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, ICON_PATH);
setProperty(IProgressConstants.ICON_PROPERTY, imageDescriptor);
setProperty(JOB_ID_KEY, String.valueOf(jobId));
setPriority(LONG);
setUser(true);
if (!JobsContainer.registerJobId(project, jobId, timestamp))
{
DialogUtils.openError(RunHandler.DIALOG_TITLE,
"There was an error when saving the job id. You may not access the results of the diagnosis run.");
}
}
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:34,代码来源:CustomDynamicSpotterRunJob.java
示例9: defineLayout
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
/**
* @param layout
* @param editorArea
*/
public void defineLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea); //$NON-NLS-1$
topLeft.addView("org.python.pydev.navigator.view");
IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
//outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
//Add the outline only if we're not using the minimap.
if (!MinimapOverviewRulerPreferencesPage.getShowMinimapContents()) {
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
}
开发者ID:fabioz,项目名称:Pydev,代码行数:22,代码来源:PythonPerspectiveFactory.java
示例10: createInitialLayout
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
/**
* Creates the initial perspective layout.
*
* @param layout
*/
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.setFixed(false);
IFolderLayout main = layout.createFolder("main", IPageLayout.LEFT, 1.0f, editorArea);
IFolderLayout sidebar = layout.createFolder("right", IPageLayout.RIGHT, 0.6f, "main");
// Main area
main.addView(Dashboard.ID);
main.addView(StatisticsView.ID);
main.addPlaceholder(ChartView.ID);
main.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
// Sidebar
sidebar.addView(SidebarView.ID);
layout.getViewLayout(StatisticsView.ID).setCloseable(false);
layout.getViewLayout(SidebarView.ID).setCloseable(false);
}
开发者ID:elexis,项目名称:elexis-3-base,代码行数:27,代码来源:StatisticsPerspective.java
示例11: addViews
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
private void addViews() {
IFolderLayout bottom =
factory.createFolder(
"bottomRight", //NON-NLS-1
IPageLayout.BOTTOM,
0.75f,
factory.getEditorArea());
bottom.addView(IPageLayout.ID_PROP_SHEET);
bottom.addView("org.gw4e.eclipse.views.PerformanceView");
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addView(JavaUI.ID_JAVADOC_VIEW);
bottom.addView(JavaUI.ID_SOURCE_VIEW);
bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
IFolderLayout topLeft =
factory.createFolder(
"topLeft", //NON-NLS-1
IPageLayout.LEFT,
0.15f,
factory.getEditorArea());
topLeft.addView(JavaUI.ID_PACKAGES);
topLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
topLeft.addPlaceholder(JavaPlugin.ID_RES_NAV);
topLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
IFolderLayout outlineFolder = factory.createFolder("right", IPageLayout.RIGHT, (float) 0.85, factory.getEditorArea()); //$NON-NLS-1$
outlineFolder.addView(IPageLayout.ID_OUTLINE);
}
开发者ID:gw4e,项目名称:gw4e.project,代码行数:33,代码来源:GW4EPerspective.java
示例12: EclipseHttpJob
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
public EclipseHttpJob( long duration, boolean lock, /*boolean failure,*/ boolean indeterminate/*, boolean reschedule, long rescheduleWait*/) {
super("http4e loading..");
this.duration = duration;
// this.failure = failure;
this.unknown = indeterminate;
// this.reschedule = reschedule;
// this.rescheduleWait = rescheduleWait;
if (lock)
setRule(ResourcesPlugin.getWorkspace().getRoot());
setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.valueOf("true"));
setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.valueOf("true"));
schedule(10);
}
开发者ID:nextinterfaces,项目名称:http4e,代码行数:15,代码来源:EclipseHttpJob.java
示例13: addViews
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
private void addViews() {
IFolderLayout bottom = layoutFactory.createFolder("bottomRight", // NON-NLS-1
IPageLayout.BOTTOM, 0.75f, layoutFactory.getEditorArea());
bottom.addView(PluginConst.RESULT_VIEW_ID);
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addView(IProgressConstants.PROGRESS_VIEW_ID);
IFolderLayout topLeft = layoutFactory.createFolder("topLeft", // NON-NLS-1
IPageLayout.LEFT, 0.25f, layoutFactory.getEditorArea());
topLeft.addView(IConsoleConstants.ID_CONSOLE_VIEW);
topLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);//ID_RES_NAV);
}
开发者ID:curiosag,项目名称:ftc,代码行数:15,代码来源:FtcPerspective.java
示例14: addShowViewShortcuts
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
protected void addShowViewShortcuts(IPageLayout layout) {
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
layout.addShowViewShortcut(DLTKUIPlugin.ID_SCRIPT_EXPLORER);
layout.addShowViewShortcut("org.eclipse.dltk.testing.ResultView"); //$NON-NLS-1$
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
layout.addShowViewShortcut("org.eclipse.dltk.ui.TypeHierarchy"); //$NON-NLS-1$
layout.addShowViewShortcut("org.eclipse.dltk.callhierarchy.view"); //$NON-NLS-1$
}
开发者ID:JuliaComputing,项目名称:JuliaDT,代码行数:12,代码来源:JuliaPerspective.java
示例15: createVerticalLayout
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
private void createVerticalLayout(IPageLayout layout) {
String relativePartId= IPageLayout.ID_EDITOR_AREA;
int relativePos= IPageLayout.LEFT;
IPlaceholderFolderLayout placeHolderLeft= layout.createPlaceholderFolder("left", IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
placeHolderLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE);
placeHolderLeft.addPlaceholder(JavaUI.ID_PACKAGES);
placeHolderLeft.addPlaceholder(JavaPlugin.ID_RES_NAV);
placeHolderLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
if (shouldShowProjectsView()) {
layout.addView(JavaUI.ID_PROJECTS_VIEW, IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA);
relativePartId= JavaUI.ID_PROJECTS_VIEW;
relativePos= IPageLayout.BOTTOM;
}
if (shouldShowPackagesView()) {
layout.addView(JavaUI.ID_PACKAGES_VIEW, relativePos, (float)0.25, relativePartId);
relativePartId= JavaUI.ID_PACKAGES_VIEW;
relativePos= IPageLayout.BOTTOM;
}
layout.addView(JavaUI.ID_TYPES_VIEW, relativePos, (float)0.33, relativePartId);
layout.addView(JavaUI.ID_MEMBERS_VIEW, IPageLayout.BOTTOM, (float)0.50, JavaUI.ID_TYPES_VIEW);
IPlaceholderFolderLayout placeHolderBottom= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
placeHolderBottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
placeHolderBottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
placeHolderBottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
placeHolderBottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
placeHolderBottom.addPlaceholder(JavaUI.ID_SOURCE_VIEW);
placeHolderBottom.addPlaceholder(JavaUI.ID_JAVADOC_VIEW);
placeHolderBottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:34,代码来源:JavaBrowsingPerspectiveFactory.java
示例16: createHorizontalLayout
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
private void createHorizontalLayout(IPageLayout layout) {
String relativePartId= IPageLayout.ID_EDITOR_AREA;
int relativePos= IPageLayout.TOP;
if (shouldShowProjectsView()) {
layout.addView(JavaUI.ID_PROJECTS_VIEW, IPageLayout.TOP, (float)0.25, IPageLayout.ID_EDITOR_AREA);
relativePartId= JavaUI.ID_PROJECTS_VIEW;
relativePos= IPageLayout.RIGHT;
}
if (shouldShowPackagesView()) {
layout.addView(JavaUI.ID_PACKAGES_VIEW, relativePos, (float)0.25, relativePartId);
relativePartId= JavaUI.ID_PACKAGES_VIEW;
relativePos= IPageLayout.RIGHT;
}
layout.addView(JavaUI.ID_TYPES_VIEW, relativePos, (float)0.33, relativePartId);
layout.addView(JavaUI.ID_MEMBERS_VIEW, IPageLayout.RIGHT, (float)0.50, JavaUI.ID_TYPES_VIEW);
IPlaceholderFolderLayout placeHolderLeft= layout.createPlaceholderFolder("left", IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
placeHolderLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE);
placeHolderLeft.addPlaceholder(JavaUI.ID_PACKAGES);
placeHolderLeft.addPlaceholder(JavaPlugin.ID_RES_NAV);
placeHolderLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
IPlaceholderFolderLayout placeHolderBottom= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
placeHolderBottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
placeHolderBottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
placeHolderBottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
placeHolderBottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
placeHolderBottom.addPlaceholder(JavaUI.ID_SOURCE_VIEW);
placeHolderBottom.addPlaceholder(JavaUI.ID_JAVADOC_VIEW);
placeHolderBottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:35,代码来源:JavaBrowsingPerspectiveFactory.java
示例17: execute
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
Job updateJob = new UpdateCheckerJob(updateManager);
updateJob.schedule();
updateJob.addJobChangeListener(new UpdateCheckerJobListener(
updateManager, ActiveTab.UPDATE_FEATURES, false));
try {
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().showView(IProgressConstants.PROGRESS_VIEW_ID);
} catch (PartInitException e) {
log.error(e);
}
return null;
}
开发者ID:wso2,项目名称:developer-studio,代码行数:15,代码来源:UpdateFeaturesCommandHandler.java
示例18: execute
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
Job updateJob = new UpdateCheckerJob(updateManager);
updateJob.schedule();
updateJob.addJobChangeListener(new UpdateCheckerJobListener(
updateManager, ActiveTab.ALL_FEATURES, false));
try {
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().showView(IProgressConstants.PROGRESS_VIEW_ID);
} catch (PartInitException e) {
log.error(e);
}
return null;
}
开发者ID:wso2,项目名称:developer-studio,代码行数:15,代码来源:InstallFeaturesCommandHandler.java
示例19: DynamicSpotterRunJob
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
/**
* Create a new job for the given project and job id.
*
* @param project
* The project the job is for
* @param jobId
* The job id of the new job
* @param timestamp
* The timestamp when the job was initiated
*/
public DynamicSpotterRunJob(final IProject project, final long jobId, long timestamp) {
super("DynamicSpotter Diagnosis '" + project.getName() + "'");
this.project = project;
this.jobId = jobId;
this.silentCancel = false;
ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, ICON_PATH);
setProperty(IProgressConstants.ICON_PROPERTY, imageDescriptor);
IAction gotoAction = new Action("Results") {
public void run() {
revealResults();
}
};
setProperty(IProgressConstants.ACTION_PROPERTY, gotoAction);
setProperty(JOB_ID_KEY, String.valueOf(jobId));
setPriority(LONG);
setUser(true);
if (!JobsContainer.registerJobId(project, jobId, timestamp)) {
DialogUtils.openError(RunHandler.DIALOG_TITLE,
"There was an error when saving the job id. You may not access the results of the diagnosis run.");
}
}
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:38,代码来源:DynamicSpotterRunJob.java
示例20: scheduleExportJob
import org.eclipse.ui.progress.IProgressConstants; //导入依赖的package包/类
protected void scheduleExportJob() throws IOException {
Path folder = Files.createTempDirectory("eclipse-export", new FileAttribute<?>[0]);
final FeatureExportInfo info = new FeatureExportInfo();
info.toDirectory = false; // in order to install from the repository
info.useJarFormat = true;
info.exportSource = false;
info.exportSourceBundle = false;
info.allowBinaryCycles = true;
info.useWorkspaceCompiledClasses = false;
info.destinationDirectory = folder.toString();
info.zipFileName = "p2-repo.zip";
info.items = getFeatures();
info.signingInfo = null; //
info.exportMetadata = true;
info.qualifier = QualifierReplacer.getDateQualifier();
final FeatureExportOperation job = new FeatureExportOperation(info, PDEUIMessages.FeatureExportJob_name);
job.setUser(true);
job.setRule(ResourcesPlugin.getWorkspace().getRoot());
job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_PLUGIN_OBJ);
// listen to job changes, we'll upload stuff when the building has been done
job.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
if (job.hasAntErrors()) {
// if there were errors when running the ant scripts, inform
// the user where the logs can be found.
final File logLocation = new File(info.destinationDirectory, "logs.zip"); //$NON-NLS-1$
if (logLocation.exists()) {
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
public void run() {
AntErrorDialog dialog = new AntErrorDialog(logLocation);
dialog.open();
}
});
}
} else if (event.getResult().isOK()) {
// can publish
try (CloseableHttpClient client = HttpClientBuilder.create().build()) {
// sign in and upload items
if (signIn(client)) {
uploadForm(client);
// upload the images
if (solution.getScreenshot() != null) {
uploadFile(client, Paths.get(solution.getScreenshot()), "upload-screenshot");
}
if (solution.getImage() != null) {
uploadFile(client, Paths.get(solution.getImage()), "upload-image");
}
// upload the repository
uploadFile(client, folder.resolve("p2-repo.zip"),"upload-p2repo");
}
} catch (Exception e) {
e.printStackTrace();
addMessage(IMessage.ERROR, e.getMessage());
}
}
}
});
job.schedule();
}
开发者ID:Itema-as,项目名称:dawn-marketplace-server,代码行数:65,代码来源:OverviewPage.java
注:本文中的org.eclipse.ui.progress.IProgressConstants类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论