Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IConfigurationElement


    void doEdit() {
        HeaderClause header = (HeaderClause) ((IStructuredSelection) viewer.getSelection()).getFirstElement();
        if (header != null) {
            Attrs copyOfProperties = new Attrs(header.getAttribs());

            IConfigurationElement configElem = configElements.get(header.getName());
            PluginEditWizard wizard = new PluginEditWizard(configElem, copyOfProperties);
            WizardDialog dialog = new WizardDialog(getManagedForm().getForm().getShell(), wizard);

            if (dialog.open() == Window.OK && wizard.isChanged()) {
                header.getAttribs().clear();
View Full Code Here


        cell.setText(label.toString());
        cell.setStyleRanges(label.getStyleRanges());

        Image image = images.get(className);
        if (image == null) {
            IConfigurationElement configElem = configElements.get(className);
            if (configElem != null) {
                String iconPath = configElem.getAttribute("icon");
                if (iconPath != null) {
                    ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(configElem.getContributor().getName(), iconPath);
                    if (descriptor != null) {
                        image = descriptor.createImage();
                        images.put(className, image);
                    }
                }
View Full Code Here

    private List<Image> images = new LinkedList<Image>();

    @Override
    public void update(ViewerCell cell) {
        IConfigurationElement element = (IConfigurationElement) cell.getElement();

        boolean deprecated = element.getAttribute("deprecated") != null;

        Styler mainStyler = deprecated ? new StrikeoutStyler(null) : null;
        StyledString label = new StyledString(element.getAttribute("name"), mainStyler);

        Styler classStyle = deprecated ? new StrikeoutStyler(StyledString.QUALIFIER_STYLER) : StyledString.QUALIFIER_STYLER;
        label.append(" [" + element.getAttribute("class") + "]", classStyle);

        cell.setText(label.toString());
        cell.setStyleRanges(label.getStyleRanges());

        String iconPath = element.getAttribute("icon");
        if (iconPath != null) {
            ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(element.getContributor().getName(), iconPath);
            if (descriptor != null) {
                Image image = descriptor.createImage();
                images.add(image);
                cell.setImage(image);
            }
View Full Code Here

        setTitle("Project Templates");
        setDescription("");

        propSupport.addPropertyChangeListener(PROP_ELEMENT, new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent evt) {
                IConfigurationElement configElem = (IConfigurationElement) evt.getNewValue();
                IProjectTemplate oldTemplate = template;
                if (configElem != null) {
                    String error = null;
                    try {
                        template = (IProjectTemplate) configElem.createExecutableExtension("class");
                    } catch (CoreException e) {
                        error = e.getMessage();
                        logger.logError("Error loading project template", e);
                    }
                    propSupport.firePropertyChange(PROP_TEMPLATE, oldTemplate, template);
View Full Code Here

    }

    if(initFiles){
      List<?> extensions = ServerManager.getServerManager().getExtensions(IDavinciServerConstants.EXTENSION_POINT_INITIAL_USER_FILES, IDavinciServerConstants.EP_TAG_INITIAL_USER_FILE);
          for (Iterator<?> iterator = extensions.iterator(); iterator.hasNext();) {
              IConfigurationElement libraryElement = (IConfigurationElement) iterator.next();
              String path = libraryElement.getAttribute(IDavinciServerConstants.EP_ATTR_INITIAL_USER_FILE_PATH);
              String name = libraryElement.getDeclaringExtension().getContributor().getName();
              Bundle bundle = Activator.getActivator().getOtherBundle(name);
              IStorage file =this.getStorage().newInstance(project.getPath());
     
          if(basePath!=null && !basePath.equals(""))
            file = file.newInstance(project.getPath()+ "/" + basePath);
View Full Code Here

  private static List<CloudServerURL> getUrls(String serverTypeId, String elementType) {
    if (!read) {
      readBrandingDefinitions();
    }
    IConfigurationElement config = brandingDefinitions.get(serverTypeId);
    if (config != null) {
      List<CloudServerURL> result = new ArrayList<CloudServerURL>();
      IConfigurationElement[] defaultUrls = config.getChildren(elementType);
      for (IConfigurationElement defaultUrl : defaultUrls) {
        String urlName = defaultUrl.getAttribute(ATTR_NAME);
        String url = defaultUrl.getAttribute(ATTR_URL);
        String signupURL = defaultUrl.getAttribute(ATTR_SIGNUP_URL);
View Full Code Here

  public static String getRemoteSystemTypeId(String serverTypeId) {
    if (!read) {
      readBrandingDefinitions();
    }
    IConfigurationElement config = brandingDefinitions.get(serverTypeId);
    if (config != null) {
      return config.getAttribute(ATTR_REMOTE_SYSTEM_TYPE_ID);
    }
    return null;
  }
View Full Code Here

  public static String getServerDisplayName(String serverTypeId) {
    if (!read) {
      readBrandingDefinitions();
    }
    IConfigurationElement config = brandingDefinitions.get(serverTypeId);
    if (config != null) {
      return config.getAttribute(ATTR_SERVER_DISPLAY_NAME);
    }
    return null;
  }
View Full Code Here

  public static String getServiceName(String serverTypeId) {
    if (!read) {
      readBrandingDefinitions();
    }
    IConfigurationElement config = brandingDefinitions.get(serverTypeId);
    if (config != null) {
      return config.getAttribute(ATTR_NAME);
    }
    return null;
  }
View Full Code Here

  public static boolean getProvideServices(String serverTypeId) {
    if (!read) {
      readBrandingDefinitions();
    }
    IConfigurationElement config = brandingDefinitions.get(serverTypeId);
    if (config != null) {
      return Boolean.valueOf(config.getAttribute(ATTR_PROVIDE_SERVICES));
    }
    return false;
  }
View Full Code Here

TOP

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

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.