Package org.eclipse.wb.core.editor.palette.model.entry

Examples of org.eclipse.wb.core.editor.palette.model.entry.ToolEntryInfo


    List<EntryInfo> entries = Lists.newArrayList();
    // send palette broadcast
    PaletteEventListener listener = frame.getBroadcast(PaletteEventListener.class);
    listener.entries(category, entries);
    // we should have exactly one entry
    ToolEntryInfo toolEntry;
    {
      assertEquals(1, entries.size());
      toolEntry = (ToolEntryInfo) entries.get(0);
    }
    // check Entry presentation
    {
      assertEquals(ObjectUtils.identityToString(prototype), toolEntry.getId());
      assertThat(toolEntry.getName()).isEqualTo("first");
      assertThat(toolEntry.getDescription()).contains("first()");
      assertSame(prototype.getIcon(), toolEntry.getIcon());
    }
    // use this entry to create new Image widget
    WidgetInfo newImage;
    {
      toolEntry.initialize(null, frame);
      CreationTool creationTool = (CreationTool) toolEntry.createTool();
      ICreationFactory creationFactory = creationTool.getFactory();
      creationFactory.activate();
      newImage = (WidgetInfo) creationFactory.getNewObject();
    }
    //
View Full Code Here

TOP

Related Classes of org.eclipse.wb.core.editor.palette.model.entry.ToolEntryInfo

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.