Package org.springsource.ide.eclipse.commons.content.core

Examples of org.springsource.ide.eclipse.commons.content.core.ContentItem


    this.template = template;
    this.shell = shell;
  }

  public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
    ContentItem selectedItem = template.getItem();
    if (!selectedItem.isLocal() && selectedItem.getRemoteDescriptor().getUrl() == null) {
      String message = NLS.bind("In the descriptor file for ''{0}'', the URL to the project ZIP is missing.",
          selectedItem.getName());
      throw new InvocationTargetException(new CoreException(new Status(IStatus.ERROR, WizardPlugin.PLUGIN_ID,
          message)));
    }

    try {
View Full Code Here


      SubMonitor monitor) throws CoreException, InterruptedException {
    Assert.isNotNull(item);
    String id = item.getId();
    ContentManager manager = ContentPlugin.getDefault().getManager();
    if (item.needsDownload()) {
      final ContentItem finalItem = item;
      final boolean[] response = { true };

      if (promptForDownload) {
        Display.getDefault().syncExec(new Runnable() {
          public void run() {
View Full Code Here

      // for the descriptor's
      // files. See the matcher for the actual matching criteria.
      if (!matcher.match(descriptor)) {
        continue;
      }
      ContentItem item = new ContentItem(descriptor.getId());
      item.setLocalDescriptor(descriptor);
      items.add(item);
    }
    return items;
  }
View Full Code Here

              for (int i = 0; i < children.getLength(); i++) {
                Node childNode = children.item(i);
                if (childNode.getNodeType() == Node.ELEMENT_NODE) {
                  if ("descriptor".equals(childNode.getNodeName())) {
                    Descriptor descriptor = Descriptor.read(childNode);
                    ContentItem item = new ContentItem(descriptor.getId(), project);
                    item.setLocalDescriptor(descriptor);
                    descriptor.setUrl(project.getName());
                    ImageDescriptor icon = null;
                    Template template = new Template(item, icon);
                    templates.add(template);
                  }
View Full Code Here

    descriptionText.redraw();
  }

  private String getWarning(Template template) {
    String requiredBundleStr = null;
    ContentItem contentItem = template.getItem();
    if (contentItem.getLocalDescriptor() != null) {
      requiredBundleStr = contentItem.getLocalDescriptor().getRequiresBundle();
    }
    if (requiredBundleStr == null && contentItem.getRemoteDescriptor() != null) {
      requiredBundleStr = contentItem.getRemoteDescriptor().getRequiresBundle();
    }

    StringBuilder missingBundleStr = new StringBuilder();
    if (requiredBundleStr != null) {
      String[] requiredBundles = requiredBundleStr.split(",");
View Full Code Here

TOP

Related Classes of org.springsource.ide.eclipse.commons.content.core.ContentItem

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.