Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IProduct


      }
     
      String message;

      String productName = null;
      IProduct product = Platform.getProduct();
      if (product != null) {
        productName = product.getName();
      }
      if (productName == null) {
        message = IDEWorkbenchMessages.PromptOnExitDialog_message0;
      } else {
        message = NLS.bind(
View Full Code Here


    if (currentPage != null) {
      activeEditor = lastActiveEditor;
    }

    String title = null;
    IProduct product = Platform.getProduct();
    if (product != null) {
      title = product.getName();
    }
    if (title == null) {
      title = ""; //$NON-NLS-1$
    }
View Full Code Here

  private void openWelcomeEditors(IWorkbenchWindow window) {
    if (IDEWorkbenchPlugin.getDefault().getPreferenceStore().getBoolean(
        IDEInternalPreferences.WELCOME_DIALOG)) {
      // show the welcome page for the product the first time the
      // workbench opens
      IProduct product = Platform.getProduct();
      if (product == null) {
        return;
      }

      AboutInfo productInfo = new AboutInfo(product);
View Full Code Here

    public void init(final Shell splash) {
        super.init(splash);
        String progressRectString = null;
        String messageRectString = null;
        String foregroundColorString = null;
        final IProduct product = Platform.getProduct();
        if (product != null) {
            progressRectString = product
                    .getProperty(IProductConstants.STARTUP_PROGRESS_RECT);
            messageRectString = product
                    .getProperty(IProductConstants.STARTUP_MESSAGE_RECT);
            foregroundColorString = product
                    .getProperty(IProductConstants.STARTUP_FOREGROUND_COLOR);
        }
        final Rectangle progressRect = StringConverter.asRectangle(progressRectString,
                new Rectangle(10, 10, 300, 15));
        setProgressRect(progressRect);

        final Rectangle messageRect = StringConverter.asRectangle(messageRectString,
                new Rectangle(10, 35, 300, 15));
        setMessageRect(messageRect);

        int foregroundColorInteger;
        try {
            foregroundColorInteger = Integer.parseInt(foregroundColorString, 16);
        } catch (final Exception ex) {
            foregroundColorInteger = 0xD2D7FF; // off white
        }

        setForeground(new RGB((foregroundColorInteger & 0xFF0000) >> 16,
                (foregroundColorInteger & 0xFF00) >> 8, foregroundColorInteger & 0xFF));

        final String buildId = ErlangPlugin.getDefault().getCore().getFeatureVersion();
        final Point buildIdPoint;
        // hardcoded to be sensible with our current splash Graphic
        if (product != null) {
            final String buildIdLocString = product.getProperty("buildIdLocation"); //$NON-NLS-1$
            buildIdPoint = StringConverter.asPoint(buildIdLocString,
                    new Point(30, splash.getSize().y - 60));
        } else {
            buildIdPoint = new Point(30, splash.getSize().y - 60);
        }
View Full Code Here

  public void init(Shell splash) {
    super.init(splash);
    String progressRectString = null;
    String messageRectString = null;
    String foregroundColorString = null;
    IProduct product = Platform.getProduct();
    if (product != null) {
      progressRectString = product
          .getProperty(IProductConstants.STARTUP_PROGRESS_RECT);
      messageRectString = product
          .getProperty(IProductConstants.STARTUP_MESSAGE_RECT);
      foregroundColorString = product
          .getProperty(IProductConstants.STARTUP_FOREGROUND_COLOR);
    }
    Rectangle progressRect = StringConverter.asRectangle(
        progressRectString, new Rectangle(10, 10, 300, 15));
    setProgressRect(progressRect);

    Rectangle messageRect = StringConverter.asRectangle(messageRectString,
        new Rectangle(10, 35, 300, 15));
    setMessageRect(messageRect);

    int foregroundColorInteger;
    try {
      foregroundColorInteger = Integer
          .parseInt(foregroundColorString, 16);
    } catch (Exception ex) {
      foregroundColorInteger = 0xD2D7FF; // off white
    }

    setForeground(new RGB((foregroundColorInteger & 0xFF0000) >> 16,
        (foregroundColorInteger & 0xFF00) >> 8,
        foregroundColorInteger & 0xFF));
    // the following code will be removed for release time
    if (PrefUtil.getInternalPreferenceStore().getBoolean(
        "SHOW_BUILDID_ON_STARTUP")) { //$NON-NLS-1$
      final String buildId = System.getProperty(
          "eclipse.buildId", "Unknown Build"); //$NON-NLS-1$ //$NON-NLS-2$
      // find the specified location.  Not currently API
      // hardcoded to be sensible with our current Europa Graphic
      String buildIdLocString = product.getProperty("buildIdLocation"); //$NON-NLS-1$
      final Point buildIdPoint = StringConverter.asPoint(buildIdLocString,
          new Point(322, 190));
      getContent().addPaintListener(new PaintListener() {

        public void paintControl(PaintEvent e) {
View Full Code Here

   * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
   */
  public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
    if (Platform.class.equals(receiver)) {
      if (PROPERTY_PRODUCT.equals(property)) {
        IProduct product= Platform.getProduct();
        if (product != null) {
          return product.getId().equals(expectedValue);
        }
        return false;
      } else if (PROPERTY_IS_BUNDLE_INSTALLED.equals(property) && args.length >= 1 && args[0] instanceof String) {
        return Platform.getBundle((String)args[0]) != null;
      }
View Full Code Here

    }

        this.workbenchWindow = window;

        // use message with no fill-in
        IProduct product = Platform.getProduct();
        String productName = null;
        if (product != null) {
      productName = product.getName();
    }
        if (productName == null) {
      productName = ""; //$NON-NLS-1$
    }
        setText(NLS.bind(WorkbenchMessages.AboutAction_text,productName));
View Full Code Here

   * the name of the default application.
   * In 3.0, the default is the "org.eclipse.ui.ide.worbench" application.
   *
   */
  private String getApplicationToRun(String[] args) {
    IProduct product = Platform.getProduct();
    if (product != null)
      return product.getApplication();
    for (int i = 0; i < args.length; i++)
      if (args[i].equals("-testApplication") && (i < args.length -1)) //$NON-NLS-1$
        return args[i+1];
    return DEFAULT_APP_3_0;
  }
View Full Code Here

   * The -testApplication argument specifies the application to be run. If the PDE JUnit launcher did not set this
   * argument, then return the name of the default application. In 3.0, the default is the
   * "org.eclipse.ui.ide.worbench" application.
   */
  private String getApplicationToRun(String[] args) {
    IProduct product = Platform.getProduct();
    if (product != null)
      return product.getApplication();
    for (int i = 0; i < args.length; i++)
      if (args[i].equals("-testApplication") && (i < args.length - 1)) //$NON-NLS-1$
        return args[i + 1];
    return DEFAULT_APP_3_0;
  }
View Full Code Here

   * The -testApplication argument specifies the application to be run. If the PDE JUnit launcher did not set this
   * argument, then return the name of the default application. In 3.0, the default is the
   * "org.eclipse.ui.ide.worbench" application.
   */
  private String getApplicationToRun(String[] args) {
    IProduct product = Platform.getProduct();
    if (product != null)
      return product.getApplication();
    for (int i = 0; i < args.length; i++)
      if (args[i].equals("-testApplication") && (i < args.length - 1)) //$NON-NLS-1$
        return args[i + 1];
    return DEFAULT_APP_3_0;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.IProduct

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.