本文整理汇总了Java中org.eclipse.jface.dialogs.IMessageProvider.NONE属性的典型用法代码示例。如果您正苦于以下问题:Java IMessageProvider.NONE属性的具体用法?Java IMessageProvider.NONE怎么用?Java IMessageProvider.NONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jface.dialogs.IMessageProvider
的用法示例。
在下文中一共展示了IMessageProvider.NONE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: updateStatusMessage
@SuppressWarnings("incomplete-switch")
private void updateStatusMessage( ValidationStatus validationStatus ) {
if( visible ) {
int messageType = IMessageProvider.NONE;
String message = null;
switch( validationStatus.getSeverity() ) {
case ERROR:
messageType = IMessageProvider.ERROR;
message = validationStatus.getMessage();
break;
case WARNING:
messageType = IMessageProvider.WARNING;
message = validationStatus.getMessage();
break;
}
setMessage( message, messageType );
setPageComplete( validationStatus.getSeverity() != Severity.ERROR );
}
}
示例3: updateMessage
public void updateMessage() {
if (currentPage == null) {
return;
}
pageMessage = currentPage.getMessage();
if (pageMessage != null && currentPage instanceof IMessageProvider) {
pageMessageType = ((IMessageProvider) currentPage).getMessageType();
} else {
pageMessageType = IMessageProvider.NONE;
}
if (pageMessage == null) {
setMessage(pageDescription);
} else {
setMessage(pageMessage, pageMessageType);
}
setErrorMessage(currentPage.getErrorMessage());
}
示例4: 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));
}
示例5: 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);
}
示例6: setMessage
public final void setMessage( String message, int messageType )
{
if ( messageArea != null )
{
if ( messageType != IMessageProvider.NONE )
{
titleImage.setVisible( false );
}
else
{
titleImage.setVisible( true );
}
if ( message == null && messageType == IMessageProvider.ERROR )
{
messageArea.updateText( "", messageType );
}
else
{
messageArea.updateText( message, messageType );
}
}
}
示例7: 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 );
}
示例8: 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;
}
示例9: 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);
}
示例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;
}
setMessage(message, providerStatus);
}
示例11: 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;
}
}
示例12: 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;
}
}
示例13: 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()));
}
}
示例14: updateMessage
public void updateMessage() {
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);
}
示例15: updateMessage
@Override
public void updateMessage() {
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);
}