Assert.isNotNull(descriptor); Assert.isTrue(!CompatibilityHelper.hasPluginObject(descriptor), NLS.bind(Messages.plugin_deactivatedLoad, this.getClass().getName(), descriptor.getUniqueIdentifier() + " is not activated")); //$NON-NLS-1$ this.descriptor = descriptor;
/** * Only constructor which needs an input definition. * * @param inputDefinition * The input definition. */ public RootEditorInput(InputDefinition inputDefinition) { Assert.isNotNull(inputDefinition); this.inputDefinition = inputDefinition; }
/** * {@inheritDoc} */ @Override public void setInputDefinition(InputDefinition inputDefinition) { Assert.isNotNull(inputDefinition); this.inputDefinition = inputDefinition; }
/** * {@inheritDoc} */ @Override public void setRootEditor(IRootEditor rootEditor) { Assert.isNotNull(rootEditor); this.rootEditor = rootEditor; }
/** * @return the rootEditor */ protected IRootEditor getRootEditor() { Assert.isNotNull(rootEditor); return rootEditor; }
/** * {@inheritDoc} */ @Override public AbstractRootEditor getRootEditor() { Assert.isNotNull(rootEditor); return rootEditor; }
/** * @param profile * {@link Profile}. * @param cmrRepositoryDefinition * {@link CmrRepositoryDefinition}. */ public ProfileEditorInput(Profile profile, CmrRepositoryDefinition cmrRepositoryDefinition) { Assert.isNotNull(profile); Assert.isNotNull(cmrRepositoryDefinition); this.profile = profile; this.cmrRepositoryDefinition = cmrRepositoryDefinition; }
public GenerateGetterSetterOperation(IType type, CompilationUnit astRoot) { Assert.isNotNull(type); this.type = type; this.astRoot = astRoot; }
@Override public void setFilePatterns(String patterns) { Assert.isNotNull(patterns); fFilePatterns = patterns; }
/** * Sets the refactoring status for this search engine. * <p> * This method must be called before start searching. The default is an empty status with status {@link RefactoringStatus#OK}. * * @param status the refactoring status to set */ public final void setStatus(final RefactoringStatus status) { Assert.isNotNull(status); fStatus= status; } }
/** * {@inheritDoc} */ @Override public void registerCallback(PreferenceEventCallback callback) { Assert.isNotNull(callback); callbacks.add(callback); }
/** * Returns with the scopes for the given scope index. Never {@code null} nor * empty. If not found, throws an exception. */ public static List<String> getScopes(int index) { List<String> scopes = LOOKUP_TABLE.get(index); Assert.isNotNull(scopes, "No scopes were registered for index: " + index); return scopes; }
public Destination(Object destination, int location) { Assert.isNotNull(destination); Assert.isLegal(location == LOCATION_AFTER || location == LOCATION_BEFORE || location == LOCATION_ON); fDestination= destination; fLocation= location; }
private TagElement createJavadocMemberReferenceTag(BodyDeclaration declaration, final AST ast) throws JavaModelException { Assert.isNotNull(ast); Assert.isNotNull(declaration); ASTNode javadocReference= createDocReference(declaration); final TagElement element= ast.newTagElement(); element.setTagName(TagElement.TAG_LINK); element.fragments().add(javadocReference); return element; }
private IResource getCommonResourceParent() { Assert.isNotNull(fResources); Assert.isTrue(fResources.length > 0);//safe - checked before return fResources[0].getParent(); }
/** * Creates a new return statement for the method invocation. * * @param invocation the method invocation to create a return statement for * @return the corresponding statement */ private ReturnStatement createReturnStatement(final MethodInvocation invocation) { Assert.isNotNull(invocation); final ReturnStatement statement= invocation.getAST().newReturnStatement(); statement.setExpression(invocation); return statement; }
/** * Checks that the editor input has profile with the {@link ExcludeRulesProfileData}. If so, * sets the {@link #profile} and {@link #profileData}. */ private void checkAndGetEditorInput() { ProfileEditorInput input = (ProfileEditorInput) formPage.getEditor().getEditorInput(); Assert.isNotNull(input.getProfile()); Assert.isNotNull(input.getProfile().getProfileData()); Assert.isLegal(input.getProfile().getProfileData().isOfType(ExcludeRulesProfileData.class), "Given profile can not be opened with the exclude rules part."); profile = input.getProfile(); profileData = profile.getProfileData().getIfInstance(ExcludeRulesProfileData.class); }
/** * Checks that the editor input has profile with the {@link SensorAssignmentProfileData}. If so, * sets the {@link #profile} and {@link #profileData}. */ private void checkAndGetEditorInput() { ProfileEditorInput input = (ProfileEditorInput) formPage.getEditor().getEditorInput(); Assert.isNotNull(input.getProfile()); Assert.isNotNull(input.getProfile().getProfileData()); Assert.isLegal(input.getProfile().getProfileData().isOfType(SensorAssignmentProfileData.class), "Given profile can not be opened with the exclude rules part."); this.profile = input.getProfile(); this.profileData = profile.getProfileData().getIfInstance(SensorAssignmentProfileData.class); }
private static InfixExpression findGroupRoot(InfixExpression node) { Assert.isTrue(isAssociativeInfix(node)); while (!isAGroupRoot(node)) { ASTNode parent = node.getParent(); Assert.isNotNull(parent); Assert.isTrue(isAssociativeInfix(parent)); Assert.isTrue(((InfixExpression) parent).getOperator() == node.getOperator()); node = (InfixExpression) parent; } return node; }