當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。