Java Code Examples for org.eclipse.core.runtime.Assert.isNotNull()

The following are Jave code examples for showing how to use isNotNull() of the org.eclipse.core.runtime.Assert class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: eclipse-batch-editor   File: BatchSourceViewerConfiguration.java   View Source Code Vote up 6 votes
/**
 * Creates configuration by given adaptable
 * 
 * @param adaptable
 *            must provide {@link ColorManager} and {@link IFile}
 */
public BatchSourceViewerConfiguration(IAdaptable adaptable) {
	IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore();
	this.fPreferenceStore = new ChainedPreferenceStore(
			new IPreferenceStore[] { getPreferences().getPreferenceStore(), generalTextStore });

	Assert.isNotNull(adaptable, "adaptable may not be null!");
	this.annotationHoover = new BatchEditorAnnotationHoover();
	
	this.contentAssistant = new ContentAssistant();
	contentAssistProcessor = new BatchEditorSimpleWordContentAssistProcessor();
	contentAssistant.enableColoredLabels(true);
	
	contentAssistant.setContentAssistProcessor(contentAssistProcessor, IDocument.DEFAULT_CONTENT_TYPE);
	for (BatchDocumentIdentifier identifier: BatchDocumentIdentifiers.values()){
		contentAssistant.setContentAssistProcessor(contentAssistProcessor, identifier.getId());
	}
	
	contentAssistant.addCompletionListener(contentAssistProcessor.getCompletionListener());

	this.colorManager = adaptable.getAdapter(ColorManager.class);
	Assert.isNotNull(colorManager, " adaptable must support color manager");
	this.defaultTextAttribute = new TextAttribute(
			colorManager.getColor(getPreferences().getColor(COLOR_NORMAL_TEXT)));
	this.adaptable=adaptable;
}
 
Example 2
Project: eclipse-bash-editor   File: BashSourceViewerConfiguration.java   View Source Code Vote up 6 votes
/**
 * Creates configuration by given adaptable
 * 
 * @param adaptable
 *            must provide {@link ColorManager} and {@link IFile}
 */
public BashSourceViewerConfiguration(IAdaptable adaptable) {
	IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore();
	this.fPreferenceStore = new ChainedPreferenceStore(
			new IPreferenceStore[] { getPreferences().getPreferenceStore(), generalTextStore });

	Assert.isNotNull(adaptable, "adaptable may not be null!");
	this.annotationHoover = new BashEditorAnnotationHoover();
	
	this.contentAssistant = new ContentAssistant();
	contentAssistProcessor = new BashEditorSimpleWordContentAssistProcessor();
	contentAssistant.enableColoredLabels(true);
	
	contentAssistant.setContentAssistProcessor(contentAssistProcessor, IDocument.DEFAULT_CONTENT_TYPE);
	for (BashDocumentIdentifier identifier: BashDocumentIdentifiers.values()){
		contentAssistant.setContentAssistProcessor(contentAssistProcessor, identifier.getId());
	}
	
	contentAssistant.addCompletionListener(contentAssistProcessor.getCompletionListener());

	this.colorManager = adaptable.getAdapter(ColorManager.class);
	Assert.isNotNull(colorManager, " adaptable must support color manager");
	this.defaultTextAttribute = new TextAttribute(
			colorManager.getColor(getPreferences().getColor(COLOR_NORMAL_TEXT)));
	this.adaptable=adaptable;
}
 
Example 3
Project: Hydrograph   File: HydrographCompletionProposal.java   View Source Code Vote up 6 votes
public HydrographCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition,
        Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo) {
    Assert.isNotNull(replacementString);
    Assert.isTrue(replacementOffset >= 0);
    Assert.isTrue(replacementLength >= 0);
    Assert.isTrue(cursorPosition >= 0);

    fReplacementString = replacementString;
    fReplacementOffset = replacementOffset;
    fReplacementLength = replacementLength;
    fCursorPosition = cursorPosition;
    fImage = image;
    fDisplayString = displayString;
    fContextInformation = contextInformation;
    fAdditionalProposalInfo = additionalProposalInfo;
}
 
Example 4
Project: tlaplus   File: ValidateableConstantSectionPart.java   View Source Code Vote up 6 votes
protected Assignment doEditFormula(Assignment formula) // gets called when editing a constant and ...
{
    Assert.isNotNull(formula);

    // Create the wizard
    AssignmentWizard wizard = new AssignmentWizard(getSection().getText(), getSection().getDescription(),
            (Assignment) formula, AssignmentWizard.SHOW_OPTION, AssignmentWizardPage.CONSTANT_WIZARD_ID);
    // Create the wizard dialog
    WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard);
    wizard.setWizardDialog(dialog);
    dialog.setHelpAvailable(true);

    // Open the wizard dialog
    if (Window.OK == dialog.open())
    {
        return wizard.getFormula();
    } else
    {
        return null;  // We get here if the user cancels.
    }
}
 
Example 5
Project: eclipse.jdt.ls   File: TextEditUtil.java   View Source Code Vote up 6 votes
public static String apply(Document doc, Collection<? extends TextEdit> edits) throws BadLocationException {
	Assert.isNotNull(doc);
	Assert.isNotNull(edits);
	List<TextEdit> sortedEdits = new ArrayList<>(edits);
	sortByLastEdit(sortedEdits);
	String text = doc.get();
	for (int i = sortedEdits.size() - 1; i >= 0; i--) {
		TextEdit te = sortedEdits.get(i);
		Range r = te.getRange();
		if (r != null && r.getStart() != null && r.getEnd() != null) {
			int start = getOffset(doc, r.getStart());
			int end = getOffset(doc, r.getEnd());
			text = text.substring(0, start)
					+ te.getNewText()
					+ text.substring(end, text.length());
		}
	}
	return text;
}
 
Example 6
Project: dsl-devkit   File: CoreSwtbotTools.java   View Source Code Vote up 6 votes
/**
 * Attempts to expand all nodes along the path specified by the node array parameter.
 * The method is copied from SWTBotTree with an additional check if the node is already expanded.
 *
 * @param bot
 *          tree bot, must not be {@code null}
 * @param nodes
 *          node path to expand, must not be {@code null} or empty
 * @return the last tree item that was expanded, or {@code null} if no item was found
 */
public static SWTBotTreeItem expandNode(final SWTBotTree bot, final String... nodes) {
  Assert.isNotNull(bot, ARGUMENT_BOT);
  Assert.isNotNull(nodes, ARGUMENT_NODES);
  assertArgumentIsNotEmpty(nodes, ARGUMENT_NODES);
  new SWTBot().waitUntil(widgetIsEnabled(bot));
  SWTBotTreeItem item = bot.getTreeItem(nodes[0]);
  if (!item.isExpanded()) {
    item.expand();
  }

  final List<String> asList = new ArrayList<String>(Arrays.asList(nodes));
  asList.remove(0);
  if (!asList.isEmpty()) {
    item = expandNode(item, asList.toArray(new String[asList.size()]));
  }

  return item;
}
 
Example 7
Project: eclipse-jenkins-editor   File: JenkinsEditorPreferencePage.java   View Source Code Vote up 5 votes
protected void createDependency(Button master, Control slave) {
	Assert.isNotNull(slave);
	indent(slave);
	MasterButtonSlaveSelectionListener listener = new MasterButtonSlaveSelectionListener(master, slave);
	master.addSelectionListener(listener);
	this.masterSlaveListeners.add(listener);
}
 
Example 8
Project: eclipse-batch-editor   File: BatchEditorPreferencePage.java   View Source Code Vote up 5 votes
protected void createDependency(Button master, Control slave) {
	Assert.isNotNull(slave);
	indent(slave);
	MasterButtonSlaveSelectionListener listener = new MasterButtonSlaveSelectionListener(master, slave);
	master.addSelectionListener(listener);
	this.masterSlaveListeners.add(listener);
}
 
Example 9
Project: eclipse-bash-editor   File: BashEditorPreferencePage.java   View Source Code Vote up 5 votes
protected void createDependency(Button master, Control slave) {
	Assert.isNotNull(slave);
	indent(slave);
	MasterButtonSlaveSelectionListener listener = new MasterButtonSlaveSelectionListener(master, slave);
	master.addSelectionListener(listener);
	this.masterSlaveListeners.add(listener);
}
 
Example 10
Project: Hydrograph   File: SaveJobFileBeforeRunDialog.java   View Source Code Vote up 5 votes
private Image getSWTImage() {
	Shell shell = getShell();
	final Display display;
	if (shell == null || shell.isDisposed()) {
		shell = getParentShell();
	}
	if (shell == null || shell.isDisposed()) {
		display = Display.getCurrent();
		// The dialog should be always instantiated in UI thread.
		// However it was possible to instantiate it in other threads
		// (the code worked in most cases) so the assertion covers
		// only the failing scenario. See bug 107082 for details.
		Assert.isNotNull(display,
				"The dialog should be created in UI thread"); //$NON-NLS-1$
	} else {
		display = shell.getDisplay();
	}

	final Image[] image = new Image[1];
	display.syncExec(new Runnable() {
		public void run() {
			image[0] = display.getSystemImage(SWT.ICON_QUESTION);
		}
	});

	return image[0];

}
 
Example 11
Project: ftc   File: TweakedLinkedModeUI.java   View Source Code Vote up 5 votes
private void disconnect() {
	Assert.isNotNull(fCurrentTarget);
	ITextViewer viewer = fCurrentTarget.getViewer();
	Assert.isNotNull(viewer);

	viewer.getDocument().removeDocumentListener(fDocumentListener);

	fAssistant.uninstall();
	fAssistant.removeProposalListener(fProposalListener);

	fCurrentTarget.fWidget = null;

	Shell shell = fCurrentTarget.fShell;
	fCurrentTarget.fShell = null;

	if (shell != null && !shell.isDisposed())
		shell.removeShellListener(fCloser);

	// this one is asymmetric: we don't install the model in
	// connect, but leave it to its callers to ensure they
	// have the model installed if they need it
	uninstallAnnotationModel(fCurrentTarget);

	unregisterAutoEditVetoer(viewer);

	// don't remove the verify key listener to let it keep its position
	// in the listener queue
	if (fCurrentTarget.fKeyListener != null)
		fCurrentTarget.fKeyListener.setEnabled(false);

	((IPostSelectionProvider) viewer).removePostSelectionChangedListener(fSelectionListener);

	redraw();
}
 
Example 12
Project: tm4e   File: TMPresentationReconciler.java   View Source Code Vote up 5 votes
@Override
public void install(ITextViewer viewer) {
	Assert.isNotNull(viewer);

	this.viewer = viewer;
	viewer.addTextInputListener(internalListener);

	IDocument document = viewer.getDocument();
	if (document != null) {
		internalListener.inputDocumentChanged(null, document);
	}
	themeChangeListener = new ThemeChangeListener();
	ThemeManager.getInstance().addPreferenceChangeListener(themeChangeListener);
}
 
Example 13
Project: fluentmark   File: AbstractConfigurationBlock.java   View Source Code Vote up 5 votes
/**
 * Creates an expandable section within the parent created previously by calling
 * <code>createSectionComposite</code>. Controls can be added directly to the returned
 * composite, which has no layout initially.
 *
 * @param label the display name of the section
 * @return a composite within the expandable section
 */
public Composite createSection(String label) {
	Assert.isNotNull(fBody);
	final ExpandableComposite excomposite = new ExpandableComposite(fBody, SWT.NONE,
			ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.COMPACT);
	if (fFirstChild == null) fFirstChild = excomposite;
	excomposite.setText(label);
	String last = null;
	if (fLastOpenKey != null && fDialogSettingsStore != null)
		last = fDialogSettingsStore.getString(fLastOpenKey);

	if (fFirstChild == excomposite && !__NONE.equals(last) || label.equals(last)) {
		excomposite.setExpanded(true);
		if (fFirstChild != excomposite) fFirstChild.setExpanded(false);
	} else {
		excomposite.setExpanded(false);
	}
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));

	updateSectionStyle(excomposite);
	manage(excomposite);

	Composite contents = new Composite(excomposite, SWT.NONE);
	excomposite.setClient(contents);

	return contents;
}
 
Example 14
Project: dsl-devkit   File: ValidValidatorFragment.java   View Source Code Vote up 5 votes
/**
 * Gets the valid model.
 *
 * @param grammar
 *          the grammar
 * @return the valid model
 */
private ValidModel getValidModel(final Grammar grammar) {
  if (model != null) {
    return model;
  }

  Resource resource = null;
  final String name = GrammarUtil.getName(grammar) + '.' + XTEXT_EXTENSION;
  URI uri;
  for (final Resource res : grammar.eResource().getResourceSet().getResources()) {
    if (res.getURI() != null && name.equals(EmfResourceUtil.getFileName(res.getURI()))) {
      resource = res;
      break;
    }
  }
  if (getValidURI() == null) {
    Assert.isNotNull(resource, NLS.bind(Messages.RESOURCE_NOT_FOUND, name));
    uri = resource.getURI().trimFileExtension().appendFileExtension(VALID_EXTENSION);
  } else {
    uri = URI.createURI(getValidURI());
  }

  resource = resource.getResourceSet().getResource(uri, true);

  final List<Issue> issues = VALIDATOR.validate(resource, LOGGER);
  for (final Issue issue : issues) {
    if (issue.isSyntaxError() || issue.getSeverity() == Severity.ERROR) {
      throw new WorkflowInterruptedException(NLS.bind(Messages.ERROR_FOUND, uri.toString()));
    }
  }
  model = (ValidModel) resource.getContents().get(0);
  return model;
}
 
Example 15
Project: egradle   File: GradleHyperlinkDetector.java   View Source Code Vote up 5 votes
public GradleHyperlinkDetector(IAdaptable adaptable) {
	Assert.isNotNull(adaptable, "Adaptable may not be null!");
	IFile ifile = adaptable.getAdapter(IFile.class);
	try {
		editorFile = getResourceHelper().toFile(ifile);
	} catch (CoreException e) {
		/*
		 * if not working - ignore, so hyper link detection will return null
		 */
	}
	transformer= adaptable.getAdapter(GradleStringTransformer.class);

}
 
Example 16
Project: ftc   File: TweakedLinkedModeUI.java   View Source Code Vote up 5 votes
private void switchPosition(LinkedPosition pos, boolean select, boolean showProposals) {
	Assert.isNotNull(pos);
	if (pos.equals(fFramePosition))
		return;

	if (fFramePosition != null && fCurrentTarget != null)
		fPositionListener.linkingFocusLost(fFramePosition, fCurrentTarget);

	// undo
	endCompoundChangeIfNeeded();

	redraw(); // redraw current position being left - usually not needed
	IDocument oldDoc = fFramePosition == null ? null : fFramePosition.getDocument();
	IDocument newDoc = pos.getDocument();

	switchViewer(oldDoc, newDoc, pos);
	fFramePosition = pos;

	if (select)
		select();
	if (fFramePosition == fExitPosition && !fIterator.isCycling())
		leave(ILinkedModeListener.NONE);
	else {
		redraw(); // redraw new position
		ensureAnnotationModelInstalled();
	}
	if (showProposals)
		triggerContentAssist();
	if (fFramePosition != fExitPosition && fDoContextInfo)
		triggerContextInfo();

	if (fFramePosition != null && fCurrentTarget != null)
		fPositionListener.linkingFocusGained(fFramePosition, fCurrentTarget);

}
 
Example 17
Project: fluentmark   File: MkOutlinePage.java   View Source Code Vote up 5 votes
public void setAction(String id, Action action) {
	Assert.isNotNull(id);
	if (action == null) {
		actions.remove(id);
	} else {
		actions.put(id, action);
	}
}
 
Example 18
Project: fluentmark   File: SwtUtil.java   View Source Code Vote up 5 votes
/**
 * Sets width and height hint for the button control. <b>Note:</b> This is a NOP if the button's
 * layout data is not an instance of <code>GridData</code>.
 *
 * @param button the button for which to set the dimension hint
 */
public static void setButtonDimensionHint(Button button) {
	Assert.isNotNull(button);
	Object gd = button.getLayoutData();
	if (gd instanceof GridData) {
		((GridData) gd).widthHint = getButtonWidthHint(button);
		((GridData) gd).horizontalAlignment = GridData.FILL;
	}
}
 
Example 19
Project: dsl-devkit   File: SwtBotToolbarButtonUtil.java   View Source Code Vote up 5 votes
/**
 * Returns whether the toolbar button is selected.
 *
 * @param toolbarButton
 *          the {@link SWTBotToolbarButton}, must not be {@code null}
 * @return {@code true} if the toolbar button is selected, {@code false} otherwise
 */
public static boolean isSelected(final SWTBotToolbarButton toolbarButton) {
  Assert.isNotNull(toolbarButton, "toolbarButton");
  return UIThreadRunnable.syncExec(toolbarButton.display, new BoolResult() {
    @Override
    public Boolean run() {
      return toolbarButton.widget.getSelection();
    }
  });
}
 
Example 20
Project: eclipse.jdt.ls   File: CompilationUnitRewriteOperationsFix.java   View Source Code Vote up 5 votes
public CompilationUnitRewriteOperationsFix(String name, CompilationUnit compilationUnit, CompilationUnitRewriteOperation[] operations) {
	super(name);
	Assert.isNotNull(operations);
	Assert.isLegal(operations.length > 0);
	fCompilationUnit= compilationUnit;
	fOperations= operations;
	fLinkedProposalModel= new LinkedProposalModel();
}
 
Example 21
Project: eclipse-batch-editor   File: PresentationSupport.java   View Source Code Vote up 4 votes
public PresentationSupport(TextAttribute defaultTextAttribute) {
	Assert.isNotNull(defaultTextAttribute);

	fDefaultTextAttribute = defaultTextAttribute;
}
 
Example 22
Project: convertigo-eclipse   File: NonRuleBasedDamagerRepairer.java   View Source Code Vote up 4 votes
/**
 * Constructor for NonRuleBasedDamagerRepairer.
 */
public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute) {
	Assert.isNotNull(defaultTextAttribute);

	fDefaultTextAttribute = defaultTextAttribute;
}
 
Example 23
Project: eclipse-bash-editor   File: PresentationSupport.java   View Source Code Vote up 4 votes
public PresentationSupport(TextAttribute defaultTextAttribute) {
	Assert.isNotNull(defaultTextAttribute);

	fDefaultTextAttribute = defaultTextAttribute;
}
 
Example 24
Project: dacapobench   File: TestingEnvironment.java   View Source Code Vote up 4 votes
public IJavaProject getJavaProject(IPath projectPath) {
  IJavaProject javaProject = JavaCore.create(getProject(projectPath));
  Assert.isNotNull(javaProject);
  return javaProject;
}
 
Example 25
Project: dacapobench   File: TestingEnvironment.java   View Source Code Vote up 4 votes
/**
 * Returns the Java Model element for the project.
 */
public IJavaProject getJavaProject(String projectName) {
  IJavaProject javaProject = JavaCore.create(getProject(projectName));
  Assert.isNotNull(javaProject);
  return javaProject;
}
 
Example 26
Project: ec4e   File: PositionBasedCompletionProposal.java   View Source Code Vote up 4 votes
/**
 * Creates a new completion proposal. All fields are initialized based on
 * the provided information.
 *
 * @param replacementString
 *            the actual string to be inserted into the document
 * @param replacementPosition
 *            the position of the text to be replaced
 * @param cursorPosition
 *            the position of the cursor following the insert relative to
 *            replacementOffset
 * @param image
 *            the image to display for this proposal
 * @param displayString
 *            the string to be displayed for the proposal
 * @param contextInformation
 *            the context information associated with this proposal
 * @param additionalProposalInfo
 *            the additional information associated with this proposal
 */
public PositionBasedCompletionProposal(String replacementString,
		Position replacementPosition, int cursorPosition, Image image,
		String displayString, IContextInformation contextInformation,
		String additionalProposalInfo) {
	Assert.isNotNull(replacementString);
	Assert.isTrue(replacementPosition != null);

	fReplacementString = replacementString;
	fReplacementPosition = replacementPosition;
	fCursorPosition = cursorPosition;
	fImage = image;
	fDisplayString = displayString;
	fContextInformation = contextInformation;
	fAdditionalProposalInfo = additionalProposalInfo;
}
 
Example 27
Project: tlaplus   File: AzureCloudTLCInstanceParameters.java   View Source Code Vote up 4 votes
@Override
public String getCredentials() {
	final String credential = System.getenv("AZURE_COMPUTE_CREDENTIALS");
	Assert.isNotNull(credential);
	return credential;
}
 
Example 28
Project: egradle   File: GradleCompletionProposal.java   View Source Code Vote up 4 votes
/**
 * Creates a new completion proposal. All fields are initialized based on
 * the provided information.
 * @param proposal 
 *
 * @param replacementOffset
 *            the offset of the text to be replaced
 * @param replacementLength
 *            the length of the text to be replaced
 * @param image
 *            the image to display for this proposal
 * @param contextInformation
 *            the context information associated with this proposal
 * @param additionalProposalInfo
 *            the additional information associated with this proposal
 * @param lazyHtmlBuilder lazy builder or <code>null</code>
 */
public GradleCompletionProposal(Proposal proposal, int replacementOffset, int replacementLength, Image image, IContextInformation contextInformation, String additionalProposalInfo, LazyLanguageElementHTMLDescriptionBuilder lazyHtmlBuilder) {
	Assert.isTrue(replacementOffset >= 0);
	Assert.isTrue(replacementLength >= 0);
	Assert.isNotNull(proposal);
	this.proposal=proposal;
	this.movement = new LazyCursorMovement(proposal);
	fReplacementOffset = replacementOffset;
	fReplacementLength = replacementLength;
	fImage = image;
	fDisplayString = proposal.getLabel();
	fContextInformation = contextInformation;
	fAdditionalProposalInfo = additionalProposalInfo;
	
	this.lazyBuilder=lazyHtmlBuilder;
}
 
Example 29
Project: tlaplus   File: ProverHelper.java   View Source Code Vote up 4 votes
/**
 * Runs the prover on the active selection in the {@link TLAEditor} with
 * focus. The active selection is the position of the caret. This method
 * runs the prover on the step at the caret, where step is either a proof
 * step or a top level USE node. A step is at the caret if the method
 * {@link ResourceHelper#getPfStepOrUseHideFromMod(ParseResult, String, ITextSelection, IDocument)}
 * returns that node for the text selection representing the caret position.
 * 
 * If there is not a step at the caret, this method will launch the prover
 * on the entire module.
 * 
 * If there are dirty editors open, this method will prompt the user
 * to save them before continuing. If there is not a valid parse result
 * available, this method will parse the module in the editor with focus.
 * If there are parse errors, the prover will not be launched, but the parse
 * error window will show the errors.
 * 
 * If statusCheck is true, this tells prover job to launch the prover
 * for status checking, not proving. If isaprove is true, the PM will
 * be launched with the --isaprove option.
 * 
 * @param checkStatus true iff the prover should only be run for status checking
 * @param isaprove true iff the PM should be called with the isaprove option
 * 
 * @return
 */
public static void runProverForActiveSelection(boolean checkStatus, boolean isaprove)
{
    boolean proceed = UIHelper.promptUserForDirtyModules();
    if (!proceed)
    {
        // the user cancelled
        return;
    }

    TLAEditor editor = EditorUtil.getTLAEditorWithFocus();
    Assert.isNotNull(editor, "User attempted to run prover without a tla editor in focus. This is a bug.");

    String[] options = null;
    if (isaprove)
    {
        options = new String[] { ITLAPMOptions.ISAPROVE };
    }

    ProverJob proverJob = new ProverJob(((FileEditorInput) editor.getEditorInput()).getFile(),
            ((ITextSelection) editor.getSelectionProvider().getSelection()).getOffset(), checkStatus, options, true);

    proverJob.setUser(true);
    proverJob.schedule();

}
 
Example 30
Project: tlaplus   File: EmptyPart.java   View Source Code Vote up 4 votes
public boolean addControl(Control control)
{
    Assert.isNotNull(control);
    return controls.add(control);
}
 
Example 31
Project: tlaplus   File: EmptyPart.java   View Source Code Vote up 4 votes
public boolean removeControl(Control control)
{
    Assert.isNotNull(control);
    return controls.remove(control);
}
 
Example 32
Project: fluentmark   File: AbstractConfigurationBlock.java   View Source Code Vote up 4 votes
public AbstractConfigurationBlock(OverlayPreferenceStore store) {
	Assert.isNotNull(store);
	fStore = store;
	fMainPage = null;
}
 
Example 33
Project: eclipse.jdt.ls   File: JDTRefactoringDescriptorComment.java   View Source Code Vote up 3 votes
/**
 * Creates a new JDT refactoring descriptor comment.
 *
 * @param project
 *            the project name, or <code>null</code>
 * @param object
 *            the refactoring object to generate a comment for
 * @param header
 *            the header of the comment (typically the unique description of
 *            the refactoring with fully qualified element names)
 */
public JDTRefactoringDescriptorComment(final String project, final Object object, final String header) {
	Assert.isNotNull(object);
	Assert.isNotNull(header);
	fProject = project;
	fHeader = header;
	initializeInferredSettings(object);
}
 
Example 34
Project: Hydrograph   File: CustomComboBoxCellEditor.java   View Source Code Vote up 2 votes
/**
 *This method helps in setting the list of combo items
 *
 * @param comboItems
 *            the list of choices for the combo box
 */
public void setItems(String[] comboItems) {
	Assert.isNotNull(comboItems);
	this.comboItems = comboItems;
	forPopulatingComboBoxItems();
}