Example #1
0
  @Override
  protected Control createContents(final Composite parent) {
    noDefaultAndApplyButton();
    final Composite panel = new Composite(parent, SWT.NONE);
    final GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    panel.setLayout(layout);

    final Label img = new Label(panel, SWT.NONE);
    img.setLayoutData(new GridData(79, SWT.DEFAULT));
    img.setImage(
        ResourceManager.getPluginImage(ErlideUIPlugin.PLUGIN_ID, "icons/full/obj16/erlang058.gif"));

    final Group composite = new Group(panel, SWT.NONE);
    final GridData gd_composite = new GridData(SWT.FILL, SWT.CENTER, false, false);
    gd_composite.widthHint = 356;
    composite.setLayoutData(gd_composite);
    composite.setLayout(new GridLayout());

    final Label text = new Label(composite, SWT.NONE);
    text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
    text.setToolTipText("Vlad Dumitrescu, Jakob Cederlund and others");
    text.setText(PreferenceMessages.ErlangPreferencePage_2);

    final Label textv = new Label(composite, SWT.NONE);
    textv.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
    final String version = ErlangPlugin.getDefault().getCore().getFeatureVersion();
    textv.setText("    version " + version);

    final Link erlideorgLink = new Link(composite, SWT.NONE);
    erlideorgLink.setText(PreferenceMessages.ErlangPreferencePage_3);

    final Link updateLink = new Link(composite, SWT.NONE);
    updateLink.setText(PreferenceMessages.ErlangPreferencePage_4);
    new Label(panel, SWT.NONE);

    final Button reportButton = new Button(panel, SWT.NONE);
    reportButton.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(final SelectionEvent e) {
            PreferencesUtil.createPreferenceDialogOn(
                getShell(), "org.erlide.ui.reporting", null, null);
          }
        });
    reportButton.setText("Report problems");
    new Label(panel, SWT.NONE);

    txtLocalErlangNodes = new Text(panel, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI);
    txtLocalErlangNodes.setText(
        "This machine supports local Erlang nodes with only short names \nbecause of its hostname configuration. \n\nTo enable long names locally, make sure that the machine \nhas a proper FQDN on the network. ");
    final GridData gd_txtLocalErlangNodes = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_txtLocalErlangNodes.widthHint = 339;
    gd_txtLocalErlangNodes.heightHint = 87;
    txtLocalErlangNodes.setLayoutData(gd_txtLocalErlangNodes);
    txtLocalErlangNodes.setVisible(false);

    return panel;
  }
Example #2
0
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.jface.action.Action#run()
  */
 @Override
 public void run() {
   final IErlModule module = erlangEditor.getModule();
   if (module == null) {
     return;
   }
   for (String suffix : suffixes) {
     final String cacheFileOSPath =
         ErlangPlugin.getDefault()
             .getStateLocation()
             .append(ErlangToolkit.createScannerModuleName(module) + suffix)
             .toOSString();
     final File cacheFile = new File(cacheFileOSPath);
     cacheFile.delete();
   }
   erlangEditor.resetAndCacheScannerAndParser();
 }
Example #3
0
 public static boolean isDebugging() {
   return ErlangPlugin.getDefault().isDebugging()
       && "true".equalsIgnoreCase(Platform.getDebugOption("org.erlide.core/debug/builder"));
 }