[Java] Use of [RCP] Kee Progressview

Source: Internet
Author: User

Progress bar

As a part of the process of decoupling Eclipse services from Workbench, the Progress View have been extracted to a separate Plug-in and refactored in order to is available for ECLIPSE4 applications.

Progressview has existed as an independent plug-in.

Currently, the Progress View plug-in is a shipped with Eclipse SDK packages, but it can be installed from update site: c1>https://hudson.eclipse.org/platform/job/eclipse4-progress-view/lastsuccessfulbuild/artifact/releng/ org.eclipse.e4.ui.progress.update/target/repository/

Step1:add Plug-in

URL is:

https://hudson.eclipse.org/platform/job/eclipse4-progress-view/lastSuccessfulBuild/artifact/releng/ org.eclipse.e4.ui.progress.update/target/repository/

STEP2: New Eclipse RCP project Progressviewmodel

This is just a test progressview,check Create simple Content

Step 3: Introduction of plug-in in the project

Step 4: Add a Add-ons,class uri bound to bundleclass://org.eclipse.e4.ui.progress/ Org.eclipse.e4.ui.progress.ProgressViewAddon (If you don't find it, just write it straight up)

Let it be initialized with the startup of the project

STEP5: Add a part, Uri bound to:bundleclass://org.eclipse.e4.ui.progress/ Org.eclipse.e4.ui.progress.ProgressView (Just write it if you can't find it), let it show the progress bar

STEP6: Instantiate a job,code as follows, and the job should be studied (Http://www.vogella.com/tutorials/EclipseJobs/article.html#prerequisite)

Button.addselectionlistener (NewSelectionlistener () {@Override Public voidwidgetselected (selectionevent arg0) {Job Job= Job.create ("runing Job", Monitor-{submonitor Submonitor=Submonitor.convert (monitor); Submonitor.begintask ("Beging Task ...", 5000);  for(inti = 0; I < 50; i++) {                        Try{Thread.Sleep (500L); } Catch(Exception e) {e.printstacktrace (); } submonitor.worked (100); }                    returnStatus.ok_status;                });            Job.schedule (); } @Override Public voidwidgetdefaultselected (Selectionevent arg0) {}});

The effect is as follows:

[Java] Use of [RCP] Kee Progressview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.