当前位置: 首页>>代码示例>>Java>>正文


Java MessageDialog.openInformation方法代码示例

本文整理汇总了Java中org.eclipse.jface.dialogs.MessageDialog.openInformation方法的典型用法代码示例。如果您正苦于以下问题:Java MessageDialog.openInformation方法的具体用法?Java MessageDialog.openInformation怎么用?Java MessageDialog.openInformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.dialogs.MessageDialog的用法示例。


在下文中一共展示了MessageDialog.openInformation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: exportOperation

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
/**
 * Exports UI-operation data to external file
 * 
 * @param file
 * @param mappingSheetRow
 * @param showErrorMessage
 * @param list
 * @throws ExternalTransformException
 */
public void exportOperation(File file, MappingSheetRow mappingSheetRow ,boolean showErrorMessage,List<GridRow> list) throws ExternalTransformException {
	if (file!=null) {
		try{
			Object object=convertUIOperationToJaxb(mappingSheetRow, list);
			marshal(ExternalOperations.class, file, object);
		} catch (Exception exception) {
			LOGGER.warn("Error ", exception);
			if(showErrorMessage){
				MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "Failed to export output fields - \n"+exception.getMessage());
			}
			return;
		}
		MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Information", "Operation exported sucessfully");
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:25,代码来源:ExternalOperationExpressionUtil.java

示例2: importExpression

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
public ExpressionData importExpression(File file, ExpressionData expressionData,boolean showErrorMessage,
	 String componentName) {
	
	if (file!=null) {
		try (FileInputStream fileInputStream=new FileInputStream(file)){
			ExternalExpressions externalExpression = (ExternalExpressions) ExternalOperationExpressionUtil.INSTANCE.unmarshal(fileInputStream,ExternalExpressions.class);
			
			expressionData = convertToUIExpression(externalExpression.getExternalExpressions(),expressionData, componentName);
			if(showErrorMessage && expressionData!=null){
				MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Information", "Expression imported sucessfully");
			}
		} catch (Exception exception) {
			LOGGER.warn("Error ", exception);
			if(showErrorMessage){
				MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "Failed to import expression - Invalid XML");
			}
		}
	}
	return expressionData;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:21,代码来源:FilterLogicExternalOperationExpressionUtil.java

示例3: exportOutputFields

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
/**
 * Exports UI-mapping data to external file
 * 
 * @param file
 * @param transformMapping
 * @param showErrorMessage
 * @param componentName
 * @throws ExternalTransformException
 */
public void exportOutputFields(File file, TransformMapping transformMapping ,boolean showErrorMessage,String componentName) throws ExternalTransformException {
	if (file!=null) {
		try{
			Object object=convertUiOutputFieldsToJaxb(transformMapping,componentName);
			marshal(ExternalMappings.class, file, object);
		} catch (Exception exception) {
			LOGGER.warn("Error ", exception);
			if(showErrorMessage){
				MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "Failed to export output fields - \n"+exception.getMessage());
			}
			return;
		}
		MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Information", "Fields exported sucessfully");
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:25,代码来源:ExternalOperationExpressionUtil.java

示例4: importOperation

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
public OperationClassData importOperation(File file, OperationClassData operationClassData ,boolean showErrorMessage,
		 String componentName) throws ExternalTransformException {
	if (file!=null) {
		try (FileInputStream fileInputStream=new FileInputStream(file)){
			ExternalOperations externalOperation=(ExternalOperations) ExternalOperationExpressionUtil.INSTANCE.unmarshal(fileInputStream,ExternalOperations.class);
			operationClassData=convertToUIOperation(operationClassData, externalOperation.getExternalOperations(), componentName);
			if(operationClassData!=null && showErrorMessage){
				MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Information", "Operation imported sucessfully");
			}
		} catch (Exception exception) {
			LOGGER.warn("Error ", exception);
			if(showErrorMessage){
				MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "Failed to import operation - Invalid XML");
			}
		}
	}
	return operationClassData;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:19,代码来源:FilterLogicExternalOperationExpressionUtil.java

示例5: openSelection

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
/**
 * Pushes any previous run back into the UI
 */
protected void openSelection() {

	final StatusBean [] beans = getSelection();
	if (beans.length == 0) {
		MessageDialog.openInformation(getViewSite().getShell(), "Please select a run", "Please select a run to open.");
		return;
	}

	// TODO FIXME Change to IScanBuilderService not selections so that it works with e4.
	// We fire a special object into the selection mechanism with the data for this run.
	// It is then up to parts to respond to this selection and update their contents.
	// We call fireSelection as the openRequest isn't in the table. This sets the workb
	for (StatusBean bean : beans) {
		selectionProvider.fireSelection(new StructuredSelection(new OpenRequest(bean)));
	}
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:20,代码来源:StatusQueueView.java

示例6: importExpression

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
/**
 * Imports UI-expression data from external file
 * 
 * @param file
 * @param mappingSheetRow
 * @param showErrorMessage
 * @param transformMapping
 * @param componentName
 * @return
 */
public MappingSheetRow importExpression(File file, MappingSheetRow mappingSheetRow, boolean showErrorMessage,
		TransformMapping transformMapping, String componentName) {
	if (file!=null) {
		try (FileInputStream fileInputStream=new FileInputStream(file)){
			ExternalExpressions externalExpression = (ExternalExpressions) unmarshal(fileInputStream,ExternalExpressions.class);
			mappingSheetRow = convertToUIExpression(mappingSheetRow, externalExpression.getExternalExpressions(),transformMapping, componentName);
			if(showErrorMessage && mappingSheetRow!=null){
				MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Information", "Expression imported sucessfully");
			}
		} catch (Exception exception) {
			LOGGER.warn("Error ", exception);
			if(showErrorMessage){
				MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "Failed to import expression - Invalid XML");
			}
		}
	}
	return mappingSheetRow;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:29,代码来源:ExternalOperationExpressionUtil.java

示例7: updateEntity

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
/**
 * Update an OCCI entity.
 * @param entity the entity to update.
 */
public void updateEntity(Entity entity)
{
	Client jocciClient = getJocciClient(entity);
	if(jocciClient == null) {
		return;
	}

       // Create the jOCCI entity.
       cz.cesnet.cloud.occi.core.Entity jocciEntity = newJocciEntity(entity);
       if(jocciEntity == null) {
       	return;
       }
       try {
		jocciEntity.setId(entity.getId());
	} catch (InvalidAttributeValueException iave) {
		reportException(iave);
		return;
	}

       try {
       	// Update the OCCI resource.
       	boolean updated = jocciClient.update(jocciEntity);
       	if(updated) {
             MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Update OCCI Entity", "Entity " + getLocation(entity) + " updated");
       	} else {
             MessageDialog.openWarning(Display.getCurrent().getActiveShell(), "Update OCCI Entity", "Entity " + getLocation(entity) + " not updated");
       	}
       } catch (CommunicationException ce) {
       	reportException(ce);
       	return;
       }
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:37,代码来源:DesignServices.java

示例8: createJimpleBreakpoint

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
private void createJimpleBreakpoint() throws CoreException, BadLocationException {
	IDocument document = getDocument();
	IFile file = getFile();
	int lineNumber = getLineNumber();

	int offset = document.getLineOffset(lineNumber - 1);
	int length = document.getLineInformation(lineNumber - 1).getLength();
	int charStart = offset;
	int charEnd = offset + length;
	try {
		String unitFqn = getUnitFqn(lineNumber - 1, offset, length);

		IMarker m = file.createMarker(JIMPLE_BREAKPOINT_MARKER);
		m.setAttribute(IMarker.LINE_NUMBER, getLineNumber());
		m.setAttribute(IMarker.MESSAGE, "Unit breakpoint: " + file.getName() + " [Line "+getLineNumber()+"]");
		m.setAttribute("Jimple.file", file.getProjectRelativePath().toPortableString());
		m.setAttribute("Jimple.project", file.getProject().getName());
		m.setAttribute("Jimple.unit.charStart", charStart);
		m.setAttribute("Jimple.unit.charEnd", charEnd);
		m.setAttribute("Jimple.unit.fqn", unitFqn);

		JimpleBreakpointManager.getInstance().createBreakpoint(m);
	} catch(UnitNotFoundException e) {
		String msg = "The selected unit couldn't be found in our Jimple model. This might be a problem related to Jimple optimizations.";
		MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Breakpoint could not be placed", msg);
	}
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:28,代码来源:ToggleJimpleBreakpointsTarget.java

示例9: open

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
public void open(){
	if(messageType==SWT.ERROR){
		MessageDialog.setDefaultOrientation(SWT.NONE);
		MessageDialog.openError(Display.getCurrent().getActiveShell(), title, message);
	}
	if(messageType==SWT.ICON_INFORMATION){
		MessageDialog.openInformation(Display.getCurrent().getActiveShell(), title, message);
	}
	if(messageType==SWT.ICON_WARNING){
		MessageDialog.openWarning(Display.getCurrent().getActiveShell(), title, message);
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:13,代码来源:CustomMessageBox.java

示例10: okPressed

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
@Override
protected void okPressed() {
	configProperty.setLookupKey(lookupKey);
	configProperty.setDriverKey(driverKey);
	if(!oldConfigProperty.equals(configProperty)){
		propertyDialogButtonBar.enableApplyButton(true);
		MessageDialog.openInformation(Display.getCurrent().getActiveShell(), Messages.INFORMATION, Messages.LOOKUP_PORT_CHANGE);
	}
	
	
	super.okPressed();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:13,代码来源:ELTLookupConfigGrid.java

示例11: createActions

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
private void createActions() {
	sampleAction = new Action() {
		public void run() {
			MessageDialog.openInformation(null, "osets-eclipse-plugin", "Sample Action Executed");
		}
	};
	sampleAction.setText("Sample Action");
	sampleAction.setToolTipText("Sample Action tool tip");
	sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK));
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:11,代码来源:TypesEditorContributor.java

示例12: openInformationMessageDialog

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
protected final void openInformationMessageDialog(String title, String message) {
    MessageDialog.openInformation(getActiveShell(), title, message);
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:4,代码来源:BaseAction.java

示例13: print

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
public void print ()
{
    if ( Printer.getPrinterList ().length == 0 )
    {
        MessageDialog.openInformation ( this.shell, "No printer", "No installed printer could be found" );
        return;
    }

    final PrintDialog dlg = new PrintDialog ( this.shell, SWT.APPLICATION_MODAL );

    final PrinterData initialPd = Printer.getDefaultPrinterData ();
    initialPd.orientation = PrinterData.LANDSCAPE;
    dlg.setPrinterData ( initialPd );

    final PrinterData pd = dlg.open ();

    if ( pd != null )
    {
        final Printer printer = new Printer ( pd );
        final ResourceManager rm = new DeviceResourceManager ( printer );
        try
        {
            printer.startJob ( "Chart" );
            printer.startPage ();

            final GC gc = new GC ( printer );
            try
            {
                final SWTGraphics g = new SWTGraphics ( gc, rm );
                try
                {
                    this.viewer.getChartRenderer ().paint ( g );
                }
                finally
                {
                    g.dispose ();
                }
            }
            finally
            {
                gc.dispose ();
            }

            printer.endPage ();
            printer.endJob ();
        }
        finally
        {
            rm.dispose ();
            printer.dispose ();
        }
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:54,代码来源:AbstractChartView.java

示例14: makeWarnDialog

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
protected void makeWarnDialog ()
{
    final Shell shell = PlatformUI.getWorkbench ().getActiveWorkbenchWindow ().getShell ();
    MessageDialog.openInformation ( shell, Messages.WriteableComposite_wrongInput, String.format ( Messages.WriteableComposite_requiredInput, this.ceil, this.floor ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:6,代码来源:WriteableComposite.java

示例15: MessageDialogSuccessful

import org.eclipse.jface.dialogs.MessageDialog; //导入方法依赖的package包/类
public void MessageDialogSuccessful(IWorkbenchWindow window) {
  MessageDialog.openInformation(window.getShell(), "ModelWriter Project Management",
      "The URD document has been created successfully");
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:5,代码来源:CreateUserRequirementDocument.java


注:本文中的org.eclipse.jface.dialogs.MessageDialog.openInformation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。