Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IProduct


     * This method hunts down the version recorded in the current product.
     *
     * @throws IOException
     */
    private void loadVersion() {
        IProduct product = Platform.getProduct();
        if (product == null || !(UDIG_PRODUCT_ID.equals(product.getId()))) {
            // chances are someone is using the SDK with their own
            // application or product.
            String message = "Unable to parse version from about.mappings file. Defaulting to a blank string."; //$NON-NLS-1$
            this.getLog().log(new Status(IStatus.INFO, ID, 0, message, null));
            this.version = "";
            return;
        }
        Bundle pluginBundle = product.getDefiningBundle();

        URL mappingsURL = FileLocator.find(pluginBundle, new Path(MAPPINGS_FILENAME), null);
        if (mappingsURL != null) {
            try {
                mappingsURL = FileLocator.resolve(mappingsURL);
View Full Code Here


    private void addAboutItem( IMenuManager helpMenu, IWorkbenchWindow window ) {
        if (helpMenu.findUsingPath(ActionFactory.ABOUT.getId()) == null) {
            IAction about = ActionFactory.ABOUT.create(window);
            String pattern = Messages.UDIGWorkbenchAdvisor_aboutUDig_text;
            IProduct product = Platform.getProduct();
            String productName;
            if( product == null ){
              UiPlugin.log("there is no product so default to uDig", null);
              productName = "uDig";
            }else{
              productName = product.getName();
            }
      about.setText(MessageFormat.format(pattern, productName));
            // About should always be at the bottom, so just append it to the menu
          IContributionItem item = new ActionContributionItem(about);
          item.setVisible(!Platform.OS_MACOSX.equals(Platform.getOS()));
View Full Code Here

   *
   * @return The version String, such as 3.5..., or an empty String.
   */
  private static String getProductVersion() {
    try {
      IProduct product = Platform.getProduct();
      String aboutText = product.getProperty("aboutText");
      String pattern = "Version: (.*)\n";
      Pattern p = Pattern.compile(pattern);
      Matcher m = p.matcher(aboutText);
      return (m.find()) ? m.group(1) : "";
    } catch (Exception e) {
View Full Code Here

  }


  protected void configureShell(Shell paramShell) {
    super.configureShell(paramShell);
    IProduct localIProduct = Platform.getProduct();
    if (localIProduct != null) {
      String[] arrayOfString = parseCSL(localIProduct.getProperty("windowImages"));
      if (arrayOfString.length > 0) {
        this.images = new Image[arrayOfString.length];
        for (int i = 0; i < arrayOfString.length; i++) {
          String str = arrayOfString[i];
          ImageDescriptor localImageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(localIProduct.getDefiningBundle().getSymbolicName(), str);
          this.images[i] = localImageDescriptor.createImage(true);
        }
        paramShell.setImages(this.images);
      }
    }
View Full Code Here

    if (!createSplash)
      return null;
   
    if (splash == null) {
     
      IProduct product = Platform.getProduct();
      if (product != null)
        splash = SplashHandlerFactory.findSplashHandlerFor(product);
     
      if (splash == null)
        splash = new EclipseSplashHandler();
View Full Code Here

    windowManager = new WindowManager();

    IIntroRegistry introRegistry = WorkbenchPlugin.getDefault()
        .getIntroRegistry();
    if (introRegistry.getIntroCount() > 0) {
      IProduct product = Platform.getProduct();
      if (product != null) {
        introDescriptor = (IntroDescriptor) introRegistry
            .getIntroForProduct(product.getId());
      }
    }

    // Initialize the activity support.
    workbenchActivitySupport = new WorkbenchActivitySupport();
View Full Code Here

        {
            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

        {
            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

  public ITriggerPointAdvisor getTriggerPointAdvisor() {
    if (advisor != null) {
      return advisor;
    }
   
    IProduct product = Platform.getProduct();
        if (product != null) {
      TriggerPointAdvisorDescriptor descriptor = TriggerPointAdvisorRegistry
          .getInstance().getAdvisorForProduct(product.getId());
      if (descriptor != null) {
        try {
          advisor = descriptor.createAdvisor();         
        } catch (CoreException e) {
          WorkbenchPlugin.log("could not create trigger point advisor", e); //$NON-NLS-1$
View Full Code Here

    private static String[] systemPropertiesKeys = new String[0];
    private static String[] mappings = loadMappings();

    private static String[] loadMappings() {
        IProduct product = Platform.getProduct();
        if (product == null) {
      return new String[0];
    }
        URL location = Platform.find(product.getDefiningBundle(), new Path(
                ABOUT_MAPPINGS));
        PropertyResourceBundle bundle = null;
        InputStream is;
        if (location != null) {
            is = null;
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.