Bug 60783 [Dialogs] [Javadoc] Review of org.eclipse.jface.dialogs
Overall I think the documentation for this package is pretty clear. Warnings: IDialogBlockedHandler.java:26: warning - Tag @see: missing #: "IProgressMonitor.clearBlocked()" IDialogBlockedHandler.java:26: warning - Tag @see: can't find IProgressMonitor.clearBlocked() in org.eclipse.jface.dialogs.IDialogBlockedHandler IDialogBlockedHandler.java:26: warning - Tag @see:illegal character: ";" in "IProgressMonitor.setBlocked();" IDialogBlockedHandler.java:26: warning - Tag @see: reference not found: IProgressMonitor.setBlocked(); IDialogBlockedHandler.java:42: warning - @param argument "blockingMonitor" is not a parameter name. IDialogBlockedHandler.java:54: warning - @param argument "blockingMonitor" is not a parameter name. DialogMessageArea.java:102: warning - Tag @see: missing #: "setTitleLayoutData(Object)" DialogMessageArea.java:90: warning - Tag @see: missing #: "setMessageLayoutData(Object)" IDialogSettings.java:125: warning - @param argument "key" is not a parameter name. DialogPage.java:277: warning - @param argument "widgetID" is not a parameter name. DialogPage.java:291: warning - @param argument "control" is not a parameter name. ErrorDialog.java:360: warning - @param argument "dialogTitle" is not a parameter name. MessageDialog.java:199: warning - @param argument "the" is not a parameter name. ProgressIndicator.java:61: warning - @param argument "max" is not a parameter name. ProgressMonitorDialog.java:236: warning - @param argument "parentShell" is not a parameter name. TitleAreaDialog.java:146: warning - @param argument "the" is not a parameter name. TitleAreaDialog.java:586: warning - @param argument "newTitle" is not a parameter name. IDialogBlockedHandler: - IDialogBlockedHandler has no description. - IDialogBlockedHandler doesn't tell me what a blocking is in this context. - The short descriptions for the showBlocked() methods do not make sense. IDialogConstants: - *_LABEL undocumented. IDialogPage: - getErrorMessage() has a <pre> that goes on too long. IDialogSettings: - The IDialogSettings description is not grammatically correct. - Short descriptions for get* and put* methods do not make sense. - getArray() description does not read well. IInputValidator: - IInputValidator has no description. IMessageProvider: - getMessageType() has a typo ("a rning message"). Dialog: - typo in the description: model instead of modal. - ELLIPSIS is undocumented. - close() is undocumented. - create() is undocumented. - getButton() uses "on" when I think it should use "in". - initializeBounds() is undocumented. - convertHeightInCharsToPixels()/ convertWidthInCharsToPixels()/ convertVerticalDLUsToPixels()/ convertHorizontalDLUsToPixels()'s description should not show all of the example on one line. DialogMessageArea: - "non editable" should be "non-editable". DialogPage: - setControl() is undocumented. DialogSettings: - code example wraps when it should be a block and is therefore unreadable. ErrorDialog: - close() undocumented. - configureShell() undocumented. IconAndMessageDialog: - Short description for createContents() is too long. - createDialogAndButtonArea()'s parent parameter is undocumented. InputDialog: - configureShell() is undocumented. MessageDialog: - configureShell() is undocumented. ProgressMonitorDialog: - getInitialSize() is undocumented. - open() is undocumented.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressIndicator.java
*/
	public void sendRemainingWork() {
		worked(totalWork - sumWorked);
	}
	
	/**
	 * Moves the progress indicator by the given amount of work units 
	 */
	public void worked(double work) {
		if (work == 0 || animated) {
			return;
		}
		sumWorked += work;
		
		if (sumWorked > totalWork) {
			sumWorked = totalWork;
		}
		
		if (sumWorked < 0) {
			sumWorked = 0;
		}
		
		int value = (int) (sumWorked / totalWork * PROGRESS_MAX);
		
		if (determinateProgressBar.getSelection() < value) {
			determinateProgressBar.setSelection(value);
		}
	}
}