org.eclipse.jface.dialogs.Dialog Java Examples
The following examples show how to use
org.eclipse.jface.dialogs.Dialog.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VariablesNodeProvider.java From birt with Eclipse Public License 1.0 | 8 votes |
@Override protected boolean doAction( ) throws Exception { isDone = false; ReportDesignHandle designHandle = (ReportDesignHandle) SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ); VariableElementHandle variable = (VariableElementHandle) ElementProcessorFactory.createProcessor( ReportDesignConstants.VARIABLE_ELEMENT ) .createElement( null ); VariableDialog dialog = new VariableDialog( Messages.getString( "VariablesNodeProvider.Dialog.Title" ), //$NON-NLS-1$ designHandle, variable ); if ( dialog.open( ) == Dialog.OK ) designHandle.getPropertyHandle( IReportDesignModel.PAGE_VARIABLES_PROP ) .add( variable ); isDone = true; createElement = variable; return true; }
Example #2
Source File: ImportProjectWizardPage.java From gama with GNU General Public License v3.0 | 6 votes |
@Override public void createControl(final Composite parent) { initializeDialogUnits(parent); final Composite workArea = new Composite(parent, SWT.NONE); setControl(workArea); workArea.setLayout(new GridLayout()); workArea.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL)); createProjectsRoot(workArea); createProjectsList(workArea); createOptionsGroup(workArea); restoreWidgetValues(); Dialog.applyDialogFont(workArea); }
Example #3
Source File: NewVariableEntryDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private void updateDeprecationWarning() { if (fWarning == null || fWarning.isDisposed()) return; for (Iterator<CPVariableElement> iter= fVariablesList.getSelectedElements().iterator(); iter.hasNext();) { CPVariableElement element= iter.next(); String deprecationMessage= element.getDeprecationMessage(); if (deprecationMessage != null) { fWarning.setText(deprecationMessage); fWarning.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING)); return; } } fWarning.setText(null); fWarning.setImage(null); }
Example #4
Source File: RouteResourcesButtonPart.java From tesb-studio-se with Apache License 2.0 | 6 votes |
@Override protected void buttonSelected(SelectionEvent e) { try { Class<?> dialogClass = Platform.getBundle("org.talend.camel.designer").loadClass( "org.talend.camel.designer.dialog.RouteResourceSelectionDialog"); Dialog dialog = (Dialog) dialogClass.getConstructor(Shell.class).newInstance(getShell()); if (dialog.open() == Dialog.OK) { RepositoryNode resourceNode = (RepositoryNode) dialogClass.getMethod("getResult").invoke(dialog); if (resourceNode != null) { listener.routeResourceNodeSelected(resourceNode); } } } catch (Exception e1) { ExceptionHandler.process(new IllegalStateException( "Can't load RouteResourceSelectionDialog from specific bundle", e1)); } }
Example #5
Source File: TableControlPanel.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
public void print() { JaretTablePrinter jtp = new JaretTablePrinter(null, _table); JaretTablePrintDialog pDialog = new JaretTablePrintDialog(Display.getCurrent().getActiveShell(), null, jtp, null); pDialog.open(); if (pDialog.getReturnCode() == Dialog.OK) { PrinterData pdata = pDialog.getPrinterData(); JaretTablePrintConfiguration conf = pDialog.getConfiguration(); Printer printer = new Printer(pdata); jtp.setPrinter(printer); jtp.print(conf); printer.dispose(); } jtp.dispose(); }
Example #6
Source File: AbstractWizardNewTypeScriptProjectCreationPage.java From typescript.java with MIT License | 6 votes |
@Override public final void createControl(Composite parent) { super.createControl(parent); Composite body = (Composite) getControl(); createPageBody(body); createWorkingSetGroup(body, wizard.getSelection(), new String[] { "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$ Dialog.applyDialogFont(body); // initialize page with default values initializeDefaultValues(); // Updates the state of the components updateComponents(null); }
Example #7
Source File: BookMarkExpressionPage.java From birt with Eclipse Public License 1.0 | 6 votes |
public void buildUI( Composite parent ) { super.buildUI( parent ); container.setLayout( WidgetUtil.createGridLayout( 2, 15 ) ); noteSection = new FormTextSection( "", container, true ); //$NON-NLS-1$ noteSection.setWidth( 450 ); noteSection.setFillText( false ); noteSection.setText( generateNoteSectionText(MESSAGE_GENERAL) ); noteSection.setImage( "image", //$NON-NLS-1$ JFaceResources.getImage( Dialog.DLG_IMG_MESSAGE_WARNING ) ); noteSection.setColor( "color", ColorManager.getColor( 127, 127, 127 ) ); //$NON-NLS-1$ addSection( PageSectionId.GENERAL_LIBRARY_NOTE, noteSection ); bookMarkProvider = new ExpressionPropertyDescriptorProvider( IReportItemModel.BOOKMARK_PROP, ReportDesignConstants.REPORT_ITEM ); bookMarkSection = new ExpressionSection( bookMarkProvider.getDisplayName( ), container, true ); bookMarkSection.setProvider( bookMarkProvider ); bookMarkSection.setWidth( 500 ); addSection( PageSectionId.BOOKMARKEXPRESSION_BOOKMARK, bookMarkSection ); createSections( ); layoutSections( ); }
Example #8
Source File: FixedFatJarExportPage.java From sarl with Apache License 2.0 | 6 votes |
@Override public void createControl(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayout layout= new GridLayout(1, false); layout.marginHeight= 0; layout.marginWidth= 0; composite.setLayout(layout); createContentGroup(composite); createLibraryHandlingGroup(composite); Label seperator= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); seperator.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); createAntScriptGroup(composite); restoreWidgetValues(); update(); Dialog.applyDialogFont(composite); setControl(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.FATJARPACKAGER_WIZARD_PAGE); }
Example #9
Source File: NLSAccessorConfigurationDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite ancestor) { Composite parent= (Composite) super.createDialogArea(ancestor); final int nOfColumns= 4; initializeDialogUnits(ancestor); GridLayout layout= (GridLayout) parent.getLayout(); layout.numColumns= nOfColumns; parent.setLayout(layout); createAccessorPart(parent, nOfColumns, convertWidthInCharsToPixels(40)); Separator s= new Separator(SWT.SEPARATOR | SWT.HORIZONTAL); s.doFillIntoGrid(parent, nOfColumns); createPropertyPart(parent, nOfColumns, convertWidthInCharsToPixels(40)); Dialog.applyDialogFont(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJavaHelpContextIds.EXTERNALIZE_WIZARD_PROPERTIES_FILE_PAGE); validateAll(); return parent; }
Example #10
Source File: AggregateOnBindingsFormHandleProvider.java From birt with Eclipse Public License 1.0 | 6 votes |
public boolean doAddMeasureOnItem( int pos ) { DataColumnBindingDialog dialog = new DataColumnBindingDialog( true ); dialog.setAggreate( true ); dialog.setMeasure( true ); ComputedColumnHandle bindingColumn = null; dialog.setInput( (ReportItemHandle) getBindingObject( ), bindingColumn ); if ( dialog.open( ) == Dialog.OK ) { if ( viewer != null ) { viewer.refresh( true ); return true; } } return false; }
Example #11
Source File: PropertyAndPreferencePage.java From typescript.java with MIT License | 6 votes |
@Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); composite.setFont(parent.getFont()); GridData data = new GridData(GridData.FILL, GridData.FILL, true, true); Control header = createPreferenceHeaderContent(composite); if (header != null) { header.setLayoutData(data); } fConfigurationBlockControl = createPreferenceBodyContent(composite); fConfigurationBlockControl.setLayoutData(data); if (isProjectPreferencePage()) { boolean useProjectSettings = hasProjectSpecificOptions(getProject()); enableProjectSpecificSettings(useProjectSettings); } Dialog.applyDialogFont(composite); return composite; }
Example #12
Source File: CascadingParametersDialog.java From birt with Eclipse Public License 1.0 | 6 votes |
protected void editParameter( ScalarParameterHandle param ) { if ( param == null ) { return; } CommandStack cmdStack = SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ) .getCommandStack( ); cmdStack.startTrans( Messages.getString( "CascadingParametersDialog.Title.EditCascadingParameter" ) ); //$NON-NLS-1$ AddEditCascadingParameterDialog dialog = new AddEditCascadingParameterDialog( Messages.getString( "CascadingParametersDialog.Title.EditCascadingParameter" ) ); //$NON-NLS-1$ dialog.setParameter( param ); if ( dialog.open( ) != Dialog.OK ) { cmdStack.rollback( ); return; } cmdStack.commit( ); refreshValueTable( ); refreshParameterProperties( ); initSorttingArea( ); updateButtons( ); }
Example #13
Source File: HiveTab.java From neoscada with Eclipse Public License 1.0 | 6 votes |
protected void chooseWorkspace () { final ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog ( getShell (), new WorkbenchLabelProvider (), new WorkbenchContentProvider () ); dialog.setTitle ( "Select driver exporter configuration file" ); dialog.setMessage ( "Choose a driver exporter file for the configuration" ); dialog.setInput ( ResourcesPlugin.getWorkspace ().getRoot () ); dialog.setComparator ( new ResourceComparator ( ResourceComparator.NAME ) ); dialog.setAllowMultiple ( true ); dialog.setDialogBoundsSettings ( getDialogBoundsSettings ( HiveTab.WORKSPACE_SELECTION_DIALOG ), Dialog.DIALOG_PERSISTSIZE ); if ( dialog.open () == IDialogConstants.OK_ID ) { final IResource resource = (IResource)dialog.getFirstResult (); if ( resource != null ) { final String arg = resource.getFullPath ().toString (); final String fileLoc = VariablesPlugin.getDefault ().getStringVariableManager ().generateVariableExpression ( "workspace_loc", arg ); //$NON-NLS-1$ this.fileText.setText ( fileLoc ); makeDirty (); } } }
Example #14
Source File: ApplicationLayoutDropAction.java From XPagesExtensionLibrary with Apache License 2.0 | 6 votes |
private Element openConfigurationDialog(Document doc, String prefix) { // Create the AppLication Layout element Element element = super.createElement(doc, prefix); // Setup the panel data PanelExtraData panelData = new PanelExtraData(); panelData.setDesignerProject(getDesignerProject()); panelData.setNode(element); // Must do the following or the property editor does not function properly panelData.setWorkbenchPart(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()); panelData.setHostWorkbenchPart(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()); // Launch the Wizard Shell shell = getControl().getShell(); ApplicationLayoutDropWizard wiz = new ApplicationLayoutDropWizard(shell, panelData); WizardDialog dialog = new WizardDialog(shell, wiz); dialog.addPageChangingListener(wiz); if (Dialog.OK != dialog.open()) { return null; } return element; }
Example #15
Source File: RowPageBreakProvider.java From birt with Eclipse Public License 1.0 | 6 votes |
public boolean doAddItem( int pos ) throws Exception { // TODO Auto-generated method stub CrosstabReportItemHandle reportHandle = null; try { reportHandle = (CrosstabReportItemHandle) ( (ExtendedItemHandle) ( ( (List) input ) ).get( 0 ) ).getReportItem( ); } catch ( ExtendedElementException e ) { // TODO Auto-generated catch block logger.log( Level.SEVERE, e.getMessage( ), e ); } CrosstabPageBreakDialog pageBreakDialog = new CrosstabPageBreakDialog( reportHandle ); pageBreakDialog.setAxis( ICrosstabConstants.ROW_AXIS_TYPE ); if ( pageBreakDialog.open( ) == Dialog.CANCEL ) { return false; } return true; }
Example #16
Source File: PropertyAndPreferenceFieldEditorPage.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); composite.setFont(parent.getFont()); GridData data = new GridData(GridData.FILL, GridData.FILL, true, true); fConfigurationBlockControl = super.createContents(composite); fConfigurationBlockControl.setLayoutData(data); if (isProjectPreferencePage()) { boolean useProjectSettings = hasProjectSpecificOptions(getProject()); enableProjectSpecificSettings(useProjectSettings); } Dialog.applyDialogFont(composite); return composite; }
Example #17
Source File: DocumentPropertySection.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
private void createAddButton(final Composite buttonComposite) { final Button addButton = getWidgetFactory().createButton(buttonComposite, org.bonitasoft.studio.document.i18n.Messages.AddSimple, SWT.FLAT); addButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).hint(85, SWT.DEFAULT).create()); addButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { super.widgetSelected(e); final DocumentWizard documentWizard = new DocumentWizard(getEObject()); final Dialog dialog = new DocumentWizardDialog(Display.getDefault().getActiveShell(), documentWizard, true); if (IDialogConstants.OK_ID == dialog.open()) { final Document newDocument = documentWizard.getDocumentWorkingCopy(); documentListViewer.setSelection(new StructuredSelection(newDocument)); } } }); }
Example #18
Source File: PropertyAndPreferencePage.java From birt with Eclipse Public License 1.0 | 6 votes |
protected Control createContents( Composite parent ) { Composite composite = new Composite( parent, SWT.NONE ); GridLayout layout = new GridLayout( ); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout( layout ); composite.setFont( parent.getFont( ) ); GridData data = new GridData( GridData.FILL, GridData.FILL, true, true ); fConfigurationBlockControl = createPreferenceContent( composite ); fConfigurationBlockControl.setLayoutData( data ); if ( isProjectPreferencePage( ) ) { boolean useProjectSettings = hasProjectSpecificOptions( getProject( ) ); enableProjectSpecificSettings( useProjectSettings ); } Dialog.applyDialogFont( composite ); return composite; }
Example #19
Source File: PropertyAndPreferencePage.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
@Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); composite.setFont(parent.getFont()); GridData data = new GridData(GridData.FILL, GridData.FILL, true, true); configurationBlockControl = createPreferenceContent(composite, getContainer()); configurationBlockControl.setLayoutData(data); if (isProjectPreferencePage()) { boolean useProjectSettings = hasProjectSpecificOptions(getProject()); enableProjectSpecificSettings(useProjectSettings); } Dialog.applyDialogFont(composite); return composite; }
Example #20
Source File: CreateVariableProposalListener.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
@Override public String handleEvent(final EObject context, final String fixedReturnType) { Assert.isNotNull(context); final EObject dataContainer = getDataContainer(context); final Data dataWorkingCopy = ProcessFactory.eINSTANCE.createData(); dataWorkingCopy.setMultiple(multipleData); dataWorkingCopy.setDataType(ModelHelper.getDataTypeForID(dataContainer, DataTypeLabels.stringDataType)); final DataWizard newWizard = new DataWizard(TransactionUtil.getEditingDomain(context), dataContainer, dataWorkingCopy, feature, Collections.singleton(feature), true, fixedReturnType); newWizard.setIsPageFlowContext(isPageFlowContext); final CustomWizardDialog wizardDialog = new CustomWizardDialog(activeShell(), newWizard, IDialogConstants.FINISH_LABEL); if (wizardDialog.open() == Dialog.OK) { RepositoryManager.getInstance().getCurrentRepository().buildXtext(); final Data newData = newWizard.getNewData(); if (newData != null) { return newData.getName(); } } return null; }
Example #21
Source File: RenameTypeWizardSimilarElementsPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public void createControl(Composite parent) { ViewForm viewForm= new ViewForm(parent, SWT.BORDER | SWT.FLAT); Composite inner= new Composite(viewForm, SWT.NULL); GridLayout layout= new GridLayout(); inner.setLayout(layout); createTreeAndSourceViewer(inner); createButtonComposite(inner); viewForm.setContent(inner); setControl(viewForm); Dialog.applyDialogFont(viewForm); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.RENAME_TYPE_WIZARD_PAGE); }
Example #22
Source File: ConnectorSection.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected Button createMoveConnectorButton(final Composite buttonsComposite) { final Button moveButton = getWidgetFactory().createButton( buttonsComposite, Messages.copyMove, SWT.FLAT); moveButton.setLayoutData(GridDataFactory.fillDefaults() .minSize(IDialogConstants.BUTTON_WIDTH, SWT.DEFAULT).create()); moveButton.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(final Event event) { final WizardDialog dialog = new WizardDialog(Display.getDefault() .getActiveShell(), new MoveConnectorWizard(OperationHistoryFactory.getOperationHistory(), getEditingDomain(), ((IStructuredSelection) tableViewer.getSelection()).toList())); if (dialog.open() == Dialog.OK) { tableViewer.refresh(); } } }); return moveButton; }
Example #23
Source File: DuplicateDiagramAction.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public void duplicate(MainProcess diagram) { String newProcessLabel = diagram.getName(); String newProcessVersion = diagram.getVersion(); DiagramRepositoryStore diagramRepositoryStore = repositoryAccessor.getRepositoryStore(DiagramRepositoryStore.class); final OpenNameAndVersionForDiagramDialog dialog = new OpenNameAndVersionForDiagramDialog( Display.getDefault().getActiveShell(), diagram, diagramRepositoryStore); dialog.forceNameUpdate(); if (dialog.open() == Dialog.OK) { final Identifier identifier = dialog.getIdentifier(); newProcessLabel = identifier.getName(); newProcessVersion = dialog.getIdentifier().getVersion(); List<ProcessesNameVersion> pools = dialog.getPools(); final DuplicateDiagramOperation op = new DuplicateDiagramOperation(); op.setDiagramToDuplicate(diagram); op.setNewDiagramName(newProcessLabel); op.setNewDiagramVersion(newProcessVersion); op.setPoolsRenamed(pools); final IProgressService service = PlatformUI.getWorkbench().getProgressService(); try { service.run(true, false, op); } catch (InvocationTargetException | InterruptedException e) { throw new RuntimeException(e.getMessage(), e); } DiagramFileStore store = diagramRepositoryStore.getDiagram(newProcessLabel, newProcessVersion); store.open(); } }
Example #24
Source File: DataWizardPage.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("restriction") protected void openClassSelectionDialog(final Text classText) { final IJavaSearchScope searchScope = SearchEngine .createJavaSearchScope(new IJavaElement[] { RepositoryManager.getInstance().getCurrentRepository() .getJavaProject() }); final OpenTypeSelectionDialog searchDialog = new OpenTypeSelectionDialog(getShell(), false, null, searchScope, IJavaSearchConstants.TYPE); if (searchDialog.open() == Dialog.OK) { classText.setText(((IType) searchDialog.getFirstResult()).getFullyQualifiedName()); } }
Example #25
Source File: ComboBoxExpressionCellEditor.java From birt with Eclipse Public License 1.0 | 5 votes |
protected Object openDialogBox( Control cellEditorWindow ) { ExpressionBuilder dialog = new ExpressionBuilder( PlatformUI.getWorkbench( ) .getDisplay( ) .getActiveShell( ), comboBox.getText( ) ); dialog.setExpressionProvier( provider ); if ( dialog.open( ) == Dialog.OK ) { return dialog.getResult( ); } setFocus( ); return null; }
Example #26
Source File: ContactSelectionDialogCellEditor.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Override protected Object openDialogBox(Control cellEditorWindow){ ContactSelectionDialog dialog = new ContactSelectionDialog(cellEditorWindow.getShell(), IContact.class, title, message); if (getValue() instanceof IContact) { // TODO pre select } if (dialog.open() == Dialog.OK) { return dialog.getSelection(); } return null; }
Example #27
Source File: QuickOutlinePopup.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected Text createFilterText(Composite parent) { filterText = new Text(parent, SWT.NONE); Dialog.applyDialogFont(filterText); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalAlignment = GridData.FILL; data.verticalAlignment = GridData.CENTER; filterText.setLayoutData(data); filterText.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { if (e.keyCode == 0x0D) // return gotoSelectedElement(); if (e.keyCode == SWT.ARROW_DOWN) treeViewer.getTree().setFocus(); if (e.keyCode == SWT.ARROW_UP) treeViewer.getTree().setFocus(); if (e.character == 0x1B) // ESC dispose(); if (e.keyCode == invokingKeystroke.getNaturalKey() && e.stateMask == invokingKeystroke.getModifierKeys()) { changeOutlineMode(); e.doit = false; } } }); return filterText; }
Example #28
Source File: MultipleInputDialog.java From goclipse with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { Composite container = (Composite)super.createDialogArea(parent); container.setLayout(new GridLayout(2, false)); container.setLayoutData(new GridData(GridData.FILL_BOTH)); panel = new Composite(container, SWT.NONE); GridLayout layout = new GridLayout(2, false); panel.setLayout(layout); panel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); for (FieldSummary field : fieldList) { switch(field.type) { case TEXT: createTextField(field.name, field.initialValue, field.allowsEmpty); break; case BROWSE: createBrowseField(field.name, field.initialValue, field.allowsEmpty); break; case VARIABLE: createVariablesField(field.name, field.initialValue, field.allowsEmpty); break; case MULTILINE_VARIABLE: createMultilineVariablesField(field.name, field.initialValue, field.allowsEmpty); break; default: break; } } fieldList = null; // allow it to be gc'd Dialog.applyDialogFont(container); return container; }
Example #29
Source File: BasePaletteFactory.java From birt with Eclipse Public License 1.0 | 5 votes |
public boolean preHandleMouseUp( ) { CreateRequest request = getRequest( ); if ( IReportElementConstants.AUTOTEXT_VARIABLE.equalsIgnoreCase( (String) request.getNewObjectType( ) ) ) { ModuleHandle reportHandle = SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ); if ( reportHandle instanceof ReportDesignHandle ) { SelectVariableDialog dialog = new SelectVariableDialog( (ReportDesignHandle) SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ) ); if ( dialog.open( ) == Dialog.OK ) { AutoTextHandle autoTextItemHandle = DesignElementFactory.getInstance( ) .newAutoText( null ); try { autoTextItemHandle.setPageVariable( (String) dialog.getResult( ) ); autoTextItemHandle.setAutoTextType( DesignChoiceConstants.AUTO_TEXT_PAGE_VARIABLE ); setModel( autoTextItemHandle ); } catch ( SemanticException e ) { ExceptionHandler.handle( e ); } return super.preHandleMouseUp( ); } } } return false; }
Example #30
Source File: GroupProvider.java From birt with Eclipse Public License 1.0 | 5 votes |
protected boolean performEdit( ReportElementHandle handle ) { GroupDialog dialog = new GroupDialog( PlatformUI.getWorkbench( ) .getDisplay( ) .getActiveShell( ), GroupDialog.GROUP_DLG_TITLE_EDIT ); dialog.setInput( handle ); return ( dialog.open( ) == Dialog.OK ); }