Examples of ContentManager


Examples of org.noos.xing.mydoggy.ContentManager

        assertEquals(content, contentByAlias);
    }


    public void test1() {
        ContentManager contentManager = toolWindowManager.getContentManager();

        Content ctn1 = contentManager.addContent("ctn1", "ctn1", null, new JButton("ctn1"));
        PropertyChangeListenerTracer ctn1Tracer = new PropertyChangeListenerTracer();       
        ctn1.addPropertyChangeListener(ctn1Tracer);

        Content ctn2 = contentManager.addContent("ctn2", "ctn2", null, new JButton("ctn2"));
        PropertyChangeListenerTracer ctn2Tracer = new PropertyChangeListenerTracer();
        ctn2.addPropertyChangeListener(ctn2Tracer);

        Content ctn3 = contentManager.addContent("ctn3", "ctn3", null, new JButton("ctn3"));
        PropertyChangeListenerTracer ctn3Tracer = new PropertyChangeListenerTracer();
        ctn3.addPropertyChangeListener(ctn3Tracer);

        contentManager.removeContent(ctn1);
        System.out.printf("dd");
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.ContentManager

        assertEquals(content.getToolTipText(), null);
        assertTrue(content.getComponent() instanceof JButton);
    }

    public void testAddContentTwo() {
        ContentManager contentManager = toolWindowManager.getContentManager();
        Content content = contentManager.addContent("key", "title", null, new JButton("Hello World!!!"), "tip");

        assertNotNull(content);
        assertEquals(contentManager.getContentCount(), 1);

        content = contentManager.getContent(0);

        assertEquals(content.getTitle(), "title");
        assertEquals(content.getIcon(), null);
        assertEquals(content.getToolTipText(), "tip");
        assertTrue(content.getComponent() instanceof JButton);
View Full Code Here

Examples of org.noos.xing.mydoggy.ContentManager

    public void testContentManager() {
        assertNotNull(toolWindowManager.getContentManager());
    }

    public void testAddContentOne() {
        ContentManager contentManager = toolWindowManager.getContentManager();
        Content content = contentManager.addContent("key", "title", null, new JButton("Hello World!!!"));

        assertNotNull(content);
        assertEquals(contentManager.getContentCount(), 1);

        content = contentManager.getContent(0);

        assertEquals(content.getTitle(), "title");
        assertEquals(content.getIcon(), null);
        assertEquals(content.getToolTipText(), null);
        assertTrue(content.getComponent() instanceof JButton);

        content = contentManager.getContent("key");

        assertEquals(content.getTitle(), "title");
        assertEquals(content.getIcon(), null);
        assertEquals(content.getToolTipText(), null);
        assertTrue(content.getComponent() instanceof JButton);
View Full Code Here

Examples of org.rhq.core.pc.content.ContentManager

        this.pluginManager = pluginManager;
        pluginFactory = new PluginComponentFactory(this, pluginManager);
        eventManager = new EventManager(configuration);
        operationManager = new OperationManager(configuration, getStreamRemoter());
        measurementManager = new MeasurementManager(configuration, getStreamRemoter(), this);
        contentManager = new ContentManager(configuration, getStreamRemoter(), this);
        availabilityExecutor = new AvailabilityExecutor(this);
        serviceScanExecutor = new RuntimeDiscoveryExecutor(this, configuration);
        serverScanExecutor = new AutoDiscoveryExecutor(null, this);
        discoveryComponentProxyFactory = new DiscoveryComponentProxyFactory(pluginFactory);
        agent = new Agent(this.configuration.getContainerName(), null, 0, null, null);
View Full Code Here

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

  public static File importDirectory(ContentItem item, final Shell shell, boolean promptForDownload,
      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() {
            response[0] = promptForDownload(shell, finalItem);
          }
        });
      }

      if (response[0]) {
        TemplateDownloader downloader = getTemplateDownloader(finalItem);
        IStatus status = downloader.downloadTemplate(monitor);
        if (!status.isOK()) {
          String message = NLS.bind("Download of template ''{0}'' failed: {1}", id, status.getMessage());
          throw new CoreException(new Status(IStatus.ERROR, WizardPlugin.PLUGIN_ID, message));
        }

        // re-get template project since it may changed
        item = manager.getItem(id);
        if (item == null) {
          return null;
        }
      }
      else if (!item.isLocal()) {
        return null;
      }
    }

    File baseDir = manager.getInstallDirectory();

    if (item.isRuntimeDefined()) {
      File directory = new File(baseDir, item.getPath());
      String projectName = item.getLocalDescriptor().getUrl();
      IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.