/** * Sets the status to INFO. * @param infoMessage the info message (can be empty, but not null) */ public void setInfo(String infoMessage) { Assert.isNotNull(infoMessage); fStatusMessage= infoMessage; fSeverity= IStatus.INFO; }
/** * Sets the descriptors adornments. Valid values are:</code> WARNING <code>,</code> ERROR <code>, * <code>PORTABLE</code>, or any combination of those. * * @param adornments the image descritpors adornments */ public void setAdornments(int adornments) { Assert.isTrue(adornments >= 0); _fFlags = adornments; }
/** * Asserts that an argument is legal. If the given boolean is * not <code>true</code>, an <code>IllegalArgumentException</code> * is thrown. * * @param expression the outcome of the check * @return <code>true</code> if the check passes (does not return * if the check fails) * @exception IllegalArgumentException if the legality test failed */ public static boolean isLegal(boolean expression) { // succeed as quickly as possible if (expression) { return true; } return isLegal(expression, "");//$NON-NLS-1$ }
/** * Sets the size of the image created by calling <code>createImage()</code>. * * @param size the size of the image returned from calling <code>createImage()</code> * @see ImageDescriptor#createImage() */ public void setImageSize(Point size) { Assert.isNotNull(size); Assert.isTrue(size.x >= 0 && size.y >= 0); _fSize = size; }
/** * Sets the status to WARNING. * @param warningMessage the warning message (can be empty, but not null) */ public void setWarning(String warningMessage) { Assert.isNotNull(warningMessage); fStatusMessage= warningMessage; fSeverity= IStatus.WARNING; }
/** * Called whenever a copy operation has been performed on a tree node. * This implementation throws an <code>AssertionFailedException</code> * since we cannot update a zip archive. * * @param structure the node for which to save the new content * @param input the object from which the structure tree was created in <code>getStructure</code> */ public void save(IStructureComparator structure, Object input) { Assert.isTrue(false); // Cannot update zip archive }
/** * Creates a new SQLImageDescriptor. * * @param baseImage an image descriptor used as the base image * @param flags flags indicating which adornments are to be rendered. See <code>setAdornments</code> for valid * values. * @param size the size of the resulting image * @see #setAdornments(int) */ public SQLImageDescriptor(ImageDescriptor baseImage, int flags, Point size) { _fBaseImage = baseImage; Assert.isNotNull(_fBaseImage); _fFlags = flags; Assert.isTrue(_fFlags >= 0); _fSize = size; Assert.isNotNull(_fSize); }
/** * Asserts that an argument is legal. If the given boolean is * not <code>true</code>, an <code>IllegalArgumentException</code> * is thrown. * * @param expression the outcome of the check * @return <code>true</code> if the check passes (does not return * if the check fails) * @exception IllegalArgumentException if the legality test failed */ public static boolean isLegal(boolean expression) { // succeed as quickly as possible if (expression) { return true; } return isLegal(expression, "");//$NON-NLS-1$ }
/** * Constructor for NonRuleBasedDamagerRepairer. * * @param defaultTextAttribute the default text attribute */ public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute) { Assert.isNotNull(defaultTextAttribute); fDefaultTextAttribute = defaultTextAttribute; }
/** * Asserts that the given boolean is <code>true</code>. If this * is not the case, some kind of unchecked exception is thrown. * * @param expression the outcome of the check * @return <code>true</code> if the check passes (does not return * if the check fails) */ public static boolean isTrue(boolean expression) { // succeed as quickly as possible if (expression) { return true; } return isTrue(expression, "");//$NON-NLS-1$ }
/** * Asserts that an argument is legal. If the given boolean is * not <code>true</code>, an <code>IllegalArgumentException</code> * is thrown. * * @param expression the outcome of the check * @return <code>true</code> if the check passes (does not return * if the check fails) * @exception IllegalArgumentException if the legality test failed */ public static boolean isLegal(boolean expression) { // succeed as quickly as possible if (expression) { return true; } return isLegal(expression, "");//$NON-NLS-1$ }
/** * Sets the status to ERROR. * @param errorMessage the error message (can be empty, but not null) */ public void setError(String errorMessage) { Assert.isNotNull(errorMessage); fStatusMessage= errorMessage; fSeverity= IStatus.ERROR; }
/** * Asserts that the given boolean is <code>true</code>. If this * is not the case, some kind of unchecked exception is thrown. * * @param expression the outcome of the check * @return <code>true</code> if the check passes (does not return * if the check fails) */ public static boolean isTrue(boolean expression) { // succeed as quickly as possible if (expression) { return true; } return isTrue(expression, "");//$NON-NLS-1$ }
public XSDSearchActionGroup(IEditorPart editor) { Assert.isNotNull(editor); // fEditor = editor; // fReferencesGroup = new ReferencesSearchGroup(editor); // fDeclarationsGroup = new DeclarationsSearchGroup(); // fImplementorsGroup = new ImplementorsSearchGroup(); // fOccurrencesGroup = new OccurrencesSearchGroup(); } }
/** * Asserts that the given boolean is <code>true</code>. If this * is not the case, some kind of unchecked exception is thrown. * * @param expression the outcome of the check * @return <code>true</code> if the check passes (does not return * if the check fails) */ public static boolean isTrue(boolean expression) { // succeed as quickly as possible if (expression) { return true; } return isTrue(expression, "");//$NON-NLS-1$ }
/** * Creates a new action with no text and no image. * <p> * Configure the action later using the set methods. * </p> * * @param site the site this action is working on */ protected SelectionDispatchAction(IWorkbenchSite site) { Assert.isNotNull(site); _fSite = site; }
/** * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) */ public Object[] getElements(Object inputElement) { Assert.isTrue(inputElement instanceof ISelection); return registry .getTabDescriptors(currentPart, (ISelection) inputElement); }
protected SelectionDispatchAction(ISelection selection) { Assert.isNotNull(selection); this.selection = selection; }
/** * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, * java.lang.Object, java.lang.Object) */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { if (tabbedPropertyViewer == null) { Assert.isTrue(viewer instanceof TabbedPropertyViewer); init((TabbedPropertyViewer) viewer); } }