Package org.eclipse.jface.window

Examples of org.eclipse.jface.window.ApplicationWindow$ApplicationWindowLayout


      public void run()
      {
       int i = 0;
       PropertyConfigurator.configure (Constants.LOG4J_FILE); bar.setSelection(i + 1); numProgIncr[0]--;
       OnlineIndex oi = new OnlineIndex(null); oi.copyArgs(args); bar.setSelection(i + 1); numProgIncr[0]--;
       ApplicationWindow viewer = oi; bar.setSelection(i + 1); numProgIncr[0]--;
       splash.close(); image.dispose();
       viewer.setBlockOnOpen(true);
       viewer.open();    
      }
    }
   
  ); //*-- end of display asynexec
  
View Full Code Here


                try {
                    IJavaProject javaProject = JavaCore.create(resource.getProject());
                    if(javaProject != null)
                    {
                        org.eclipse.jdt.core.search.IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
                        SelectionDialog sd = JavaUI.createTypeDialog(getShell(), new ApplicationWindow(getShell()), searchScope, 2, false);
                        sd.open();
                        Object objects[] = sd.getResult();
                        if(objects != null && objects.length > 0)
                        {
                            IType type = (IType)objects[0];
                            String fullyQualifiedName = type.getFullyQualifiedName('.');
                            valueText.setText(type.getFullyQualifiedName());
                            String[] interfaces = type.getSuperInterfaceNames();
                            boolean isList = false;
                            if ("java.lang.Object".equals(fullyQualifiedName)) isList = true; //$NON-NLS-1$
                            else {
                              for (int i=0; i<interfaces.length; i++) {
                                  if (interfaces[i].equals("java.util.Collection") || interfaces[i].equals("java.util.List") || interfaces[i].equals("java.util.Set")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                                      isList = true;
                                      break;
                                  }
                              }
                            }
                            if (isList) {
                                singleBrowse.setEnabled(true);
                                singleLabel.setEnabled(true);
                                singleValueText.setEnabled(true);
                            }
                            else {
                                singleBrowse.setEnabled(false);
                                singleLabel.setEnabled(false);
                                singleValueText.setEnabled(false);
                                singleValueText.setText(""); //$NON-NLS-1$
                            }
                        }
                    }
                    else {
                        MessageDialog.openError(getShell(), Messages.ContextValueDialog_JAVA_PROJECT_ERROR, Messages.ContextValueDialog_MUST_BE_JAVA_PROJECT);
                    }
                }
                catch(JavaModelException _ex) { }
            }

            @Override
      public void mouseDoubleClick(MouseEvent mouseevent)
            {
            }

            @Override
      public void mouseUp(MouseEvent mouseevent)
            {
            }

        });

        boolean enabled = false;
        if (null != contextValue && null != contextValue.singularClass) enabled = true;
    singleLabel = new Label(composite, SWT.NULL);
    singleLabel.setEnabled(enabled);
    singleLabel.setText(Messages.ContextValueDialog_LABEL_LIST_ENTRY_TYPE);
    singleValueText = new Text(composite, SWT.BORDER);
    singleValueText.setEnabled(enabled);
    singleValueText.setBackground(new Color(null, 255, 255, 255));
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.widthHint = 250;
    singleValueText.setLayoutData(gd);
    if (enabled) singleValueText.setText(contextValue.singularClass.getName());
        singleBrowse = new Button(composite, 8);
        singleBrowse.setEnabled(enabled);
        singleBrowse.setText(Messages.ContextValueDialog_BUTTON_BROWSE);
        singleBrowse.addMouseListener(new MouseListener() {
            @Override
      public void mouseDown(MouseEvent e)
            {
                try {
                    IJavaProject javaProject = JavaCore.create(resource.getProject());
                    if(javaProject != null)
                    {
                        org.eclipse.jdt.core.search.IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
                        SelectionDialog sd = JavaUI.createTypeDialog(getShell(), new ApplicationWindow(getShell()), searchScope, 2, false);
                        sd.open();
                        Object objects[] = sd.getResult();
                        if(objects != null && objects.length > 0)
                        {
                            IType type = (IType)objects[0];
View Full Code Here

    pluginPreferences.setDefault(CONFIGURATION_VIEW_SHOW_DISABLED, false);
    pluginPreferences.setValue(CONFIGURATION_VIEW_SHOW_DISABLED, true);
    org.eclipse.update.internal.ui.UpdateUI.getDefault().savePluginPreferences();

    /* Open Config Dialog */
    ApplicationWindow appWindow = new org.eclipse.update.internal.ui.ConfigurationManagerWindow(fShell) {
      @Override
      public MenuManager getMenuBarManager() {
        return new MenuManager(); //Disables the Menu Bar
      }
    };
    appWindow.create();
    appWindow.getShell().setText(Messages.ManageConfigurationAction_MANAGE_ADDONS);
    appWindow.getShell().setImages(fShell.getImages());
    appWindow.open();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.window.ApplicationWindow$ApplicationWindowLayout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.