當前位置: 首頁>>代碼示例>>Java>>正文


Java IMessageProvider.INFORMATION屬性代碼示例

本文整理匯總了Java中org.eclipse.jface.dialogs.IMessageProvider.INFORMATION屬性的典型用法代碼示例。如果您正苦於以下問題:Java IMessageProvider.INFORMATION屬性的具體用法?Java IMessageProvider.INFORMATION怎麽用?Java IMessageProvider.INFORMATION使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.jface.dialogs.IMessageProvider的用法示例。


在下文中一共展示了IMessageProvider.INFORMATION屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: create

@Override
public void create() {
	super.create();

	String title;
	String message;
	int type;

	if (anomalyCausingConstraints == null) {
		title = getTitleNoAnomaly();
		message = getMessageNoAnomaly();
		type = IMessageProvider.INFORMATION;
	} else {
		title = getTitleAnomalyExplanation();
		message = getMessageAnomalyExplanation();
		type = IMessageProvider.ERROR;
	}

	setTitle(title);

	setMessage(message, type);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:22,代碼來源:DwAnomalyExplanationDialog.java

示例2: create

@Override
public void create() {
	super.create();

	String title;
	String message;
	int type;

	if (invalidContextValues == null && invalidDate == null) {
		title = TITLE_NO_INVALID_CONTEXT;
		message = MESSAGE_NO_INVALID_CONTEXT;
		type = IMessageProvider.INFORMATION;
	} else {
		title = TITLE_INVALID_CONTEXT;
		message = MESSAGE_INVALID_CONTEXT;
		type = IMessageProvider.ERROR;
	}

	setTitle(title);

	setMessage(message, type);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:22,代碼來源:DwInvalidContextInfoDialog.java

示例3: getStatus

@Override
public IStatus getStatus() {
  // DialogPage has an unfortunately complex set of message possibilities
  String message = messages.getErrorMessage();
  if (message != null) {
    return new Status(IStatus.ERROR, PLUGIN_ID, message);
  }
  int messageType = messages.getMessageType();
  switch (messageType) {
    case IMessageProvider.INFORMATION:
      return new Status(IStatus.INFO, PLUGIN_ID, messages.getMessage());
    case IMessageProvider.WARNING:
      return new Status(IStatus.WARNING, PLUGIN_ID, messages.getMessage());
    case IMessageProvider.ERROR:
      return new Status(IStatus.ERROR, PLUGIN_ID, messages.getMessage());
    default:
      return Status.OK_STATUS;
  }
}
 
開發者ID:GoogleCloudPlatform,項目名稱:google-cloud-eclipse,代碼行數:19,代碼來源:FieldEditorWrapper.java

示例4: create

@Override
public void create() {
    super.create();
    setTitle("Event Details");

    String titleMessage = "";
    titleMessage += "\tGeneration Time:\t" + TimeEncoding.toString(event.getGenerationTime()) + "\n";
    titleMessage += "\tReception Time:\t" + TimeEncoding.toString(event.getReceptionTime());
    int icon = IMessageProvider.NONE;
    if (event.getSeverity() == EventSeverity.ERROR)
        icon = IMessageProvider.ERROR;
    else if (event.getSeverity() == EventSeverity.WARNING)
        icon = IMessageProvider.WARNING;
    else if (event.getSeverity() == EventSeverity.INFO)
        icon = IMessageProvider.INFORMATION;
    setMessage(titleMessage, icon);
}
 
開發者ID:yamcs,項目名稱:yamcs-studio,代碼行數:17,代碼來源:EventDetailsDialog.java

示例5: update

public void update() {
	if (controlMessages.isEmpty()) {
		decoration.setDescriptionText(null);
		decoration.hide();
	} else {
		final ArrayList peers = createPeers(controlMessages);
		final int type = ((IMessage) peers.get(0)).getMessageType();
		final String description = createDetails(createPeers(peers), true);
		if (type == IMessageProvider.ERROR)
			decoration.setImage(standardError.getImage());
		else if (type == IMessageProvider.WARNING)
			decoration.setImage(standardWarning.getImage());
		else if (type == IMessageProvider.INFORMATION)
			decoration.setImage(standardInformation.getImage());
		decoration.setDescriptionText(description);
		decoration.show();
	}
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:18,代碼來源:MessageManager.java

示例6: addUserInputPages

@Override
protected void addUserInputPages() {

	String message= null;
	int messageType= IMessageProvider.NONE;
	if(!getExtractConstantRefactoring().selectionAllStaticFinal()) {
		message= RefactoringMessages.ExtractConstantInputPage_selection_refers_to_nonfinal_fields;
		messageType= IMessageProvider.INFORMATION;
	} else {
		message= MESSAGE;
		messageType= IMessageProvider.NONE;
	}

	String[] guessedNames= getExtractConstantRefactoring().guessConstantNames();
	String initialValue= guessedNames.length == 0 ? "" : guessedNames[0]; //$NON-NLS-1$
	addPage(new ExtractConstantInputPage(message, messageType, initialValue, guessedNames));
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:17,代碼來源:ExtractConstantWizard.java

示例7: updateMessage

public void updateMessage() {
	if (commitButton == null)
		// Not yet fully initialized.
		return;

	String message = null;
	int type = IMessageProvider.NONE;

	String commitMsg = getEditor().getText().getText().toString();
	if (commitMsg == null || commitMsg.trim().length() == 0) {
		message = Messages.FilesChangedListDialog_EmptyMessage;
		type = IMessageProvider.INFORMATION;
	} else if (!isCommitWithoutFilesAllowed()) {
		message = Messages.FilesChangedListDialog_EmptySelection;
		type = IMessageProvider.INFORMATION;
	}

	setMessage(message, type);
	boolean commitEnabled = type == IMessageProvider.WARNING
			|| type == IMessageProvider.NONE;
	commitButton.setEnabled(commitEnabled);
	commitAndPushButton.setEnabled(commitEnabled);
}
 
開發者ID:SEMERU-WM,項目名稱:ChangeScribe,代碼行數:23,代碼來源:FilesChangedListDialog.java

示例8: setTitleMessage

public void setTitleMessage( String newMessage, int newType )
{
	Image newImage = null;
	if ( newMessage != null )
	{
		switch ( newType )
		{
			case IMessageProvider.NONE :
				break;
			case IMessageProvider.INFORMATION :
				newImage = JFaceResources.getImage( DLG_IMG_MESSAGE_INFO );
				break;
			case IMessageProvider.WARNING :
				newImage = JFaceResources.getImage( DLG_IMG_MESSAGE_WARNING );
				break;
			case IMessageProvider.ERROR :
				newImage = JFaceResources.getImage( DLG_IMG_MESSAGE_ERROR );
				break;
		}
	}
	showTitleMessage( newMessage, newImage );
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:22,代碼來源:StyleBuilder.java

示例9: getMessageProviderType

public static int getMessageProviderType(IStatus status) {
	if (status == null) {
		return IMessageProvider.NONE;
	}

	switch (status.getSeverity()) {
	case IStatus.INFO:
		return IMessageProvider.INFORMATION;
	case IStatus.WARNING:
		return IMessageProvider.WARNING;
	case IStatus.ERROR:
		return IMessageProvider.ERROR;
	}
	return IMessageProvider.NONE;
}
 
開發者ID:eclipse,項目名稱:cft,代碼行數:15,代碼來源:EditorMessageTypes.java

示例10: setMessageInPage

protected void setMessageInPage(IStatus status) {
	String message = status.getMessage();
	int providerStatus = IMessageProvider.NONE;
	switch (status.getSeverity()) {
	case IStatus.INFO:
		providerStatus = IMessageProvider.INFORMATION;
		break;
	case IStatus.WARNING:
		providerStatus = IMessageProvider.WARNING;
		break;
	}

	editorPage.setMessage(message, providerStatus);
}
 
開發者ID:osswangxining,項目名稱:dockerfoundry,代碼行數:14,代碼來源:EditorAction.java

示例11: setMessageInPage

protected void setMessageInPage(IStatus status) {
	String message = status.getMessage();
	int providerStatus = IMessageProvider.NONE;
	switch (status.getSeverity()) {
	case IStatus.INFO:
		providerStatus = IMessageProvider.INFORMATION;
		break;
	case IStatus.WARNING:
		providerStatus = IMessageProvider.WARNING;
		break;
	}

	setMessage(message, providerStatus);
}
 
開發者ID:osswangxining,項目名稱:dockerfoundry,代碼行數:14,代碼來源:DockerFoundryApplicationsEditorPage.java

示例12: convertSeverity

/**
 * Converts a standard IStatus's severity into the severity flags used by
 * dialogs and property pages.
 */
protected static int convertSeverity(IStatus status) {
  switch (status.getSeverity()) {
    case IStatus.ERROR:
      return IMessageProvider.ERROR;
    case IStatus.WARNING:
      return IMessageProvider.WARNING;
    case IStatus.INFO:
      return IMessageProvider.INFORMATION;
    default:
      return IMessageProvider.NONE;
  }
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:16,代碼來源:AbstractProjectPropertyPage.java

示例13: convertSeverity

private static int convertSeverity(IStatus status) {
  switch (status.getSeverity()) {
    case IStatus.ERROR:
      return IMessageProvider.ERROR;
    case IStatus.WARNING:
      return IMessageProvider.WARNING;
    case IStatus.INFO:
      return IMessageProvider.INFORMATION;
    default:
      return IMessageProvider.NONE;
  }
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:12,代碼來源:AbstractTitleAreaDialog.java

示例14: updateText

/**
 * Show the new message in the message text and update the image. Base the background color on
 * whether or not there are errors.
 * 
 * @param newMessage
 *            The new value for the message
 * @param newType
 *            One of the IMessageProvider constants. If newType is IMessageProvider.NONE show
 *            the title.
 * @see IMessageProvider
 */
public void updateText(final String newMessage, final int newType) {
	Image newImage = null;
	boolean showingError = false;
	switch (newType) {
	case IMessageProvider.NONE:
		hideRegion();
		return;
	case IMessageProvider.INFORMATION:
		newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO);
		break;
	case IMessageProvider.WARNING:
		newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING);
		break;
	case IMessageProvider.ERROR:
		newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR);
		showingError = true;
		break;
	}

	if (newMessage == null) {//No message so clear the area
		hideRegion();
		return;
	}
	showRegion();
	// Any more updates required
	if (newMessage.equals(messageText.getText()) && newImage == messageImageLabel.getImage()) {
		return;
	}
	messageImageLabel.setImage(newImage);
	messageText.setText(newMessage);
	if (showingError) {
		setMessageColors(JFaceColors.getErrorBackground(messageComposite.getDisplay()));
	} else {
		lastMessageText = newMessage;
		setMessageColors(JFaceColors.getBannerBackground(messageComposite.getDisplay()));
	}

}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:49,代碼來源:MessageRegion.java

示例15: validateTextField

@Override
protected RefactoringStatus validateTextField(String text) {
	try {
		getExtractConstantRefactoring().setConstantName(text);
		updatePreviewLabel();
		RefactoringStatus result= getExtractConstantRefactoring().checkConstantNameOnChange();
		if (fOriginalMessageType == IMessageProvider.INFORMATION && result.getSeverity() == RefactoringStatus.OK)
			return RefactoringStatus.createInfoStatus(fOriginalMessage);
		else
			return result;
	} catch (JavaModelException e) {
		JavaPlugin.log(e);
		return RefactoringStatus.createFatalErrorStatus(RefactoringMessages.ExtractConstantInputPage_Internal_Error);
	}
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:15,代碼來源:ExtractConstantWizard.java


注:本文中的org.eclipse.jface.dialogs.IMessageProvider.INFORMATION屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。