Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 165406 Details for
Bug 309786
Jobs cannot be rescheduled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Snippet to demonstrate the problem.
snippet.txt (text/plain), 1.90 KB, created by
Niels Lippke
on 2010-04-20 06:17:41 EDT
(
hide
)
Description:
Snippet to demonstrate the problem.
Filename:
MIME Type:
Creator:
Niels Lippke
Created:
2010-04-20 06:17:41 EDT
Size:
1.90 KB
patch
obsolete
>public class ListTestPart extends ViewPart { > > FormToolkit toolkit; > String[] elements; > > @Override > public void createPartControl(Composite parent) { > Link l = new Link(parent, SWT.NONE); > l.setText("<a>start</a>"); > final TableViewer v = new TableViewer(parent, SWT.BORDER); > v.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); > v.setLabelProvider(new LabelProvider() { > /** {@inheritDoc} */ > @Override > public String getText(Object element) { > return element.toString(); > }}); > v.setContentProvider(new ArrayContentProvider()); > final Job job = new Job("loading") { > /** {@inheritDoc} */ > @Override > protected IStatus run(IProgressMonitor monitor) { > elements = new String[100]; > for (int i=0;i<100;i++) { > elements[i] = "Element " + i; > try { > Thread.currentThread().sleep(10); > } catch (InterruptedException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > } > return Status.OK_STATUS; > }}; > job.setUser(true); > job.setPriority(Job.SHORT); > job.addJobChangeListener(new JobChangeAdapter() { > @Override > public void done(IJobChangeEvent event) { > if (event.getResult().getSeverity() == Status.CANCEL) { > System.out.println("Cancel????"); > return; > } > v.getControl().getDisplay().asyncExec(new Runnable() { > > @Override > public void run() { > v.setInput(elements); > }}); > } > }); > l.addSelectionListener(new SelectionAdapter() { > > /** {@inheritDoc} */ > @Override > public void widgetSelected(SelectionEvent e) { > job.schedule(); > } > > }); > GridLayoutFactory.swtDefaults().generateLayout(parent); > } > > > > /** {@inheritDoc} */ > @Override > public void dispose() { > super.dispose(); > } > > > > @Override > public void setFocus() { > // TODO Auto-generated method stub > > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 309786
: 165406