Examples of JavaInfo


Examples of org.eclipse.wb.core.model.JavaInfo

            "    }",
            "  }",
            "}");
    WidgetInfo panel = frame.getChildrenWidgets().get(0);
    // begin creating Button
    JavaInfo newButton = loadCreationTool("com.google.gwt.user.client.ui.Button");
    // move on "panel": feedback appears, command not null
    canvas.moveTo(panel, 0, 0);
    canvas.assertFeedbacks(canvas.getTargetPredicate(panel));
    canvas.assertCommandNotNull();
    // click, so finish creation
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

    // create new Section
    FlowContainer flowContainer = new FlowContainerFactory(stack, true).get().get(0);
    {
      assertFalse(flowContainer.isHorizontal());
    }
    JavaInfo newSection = createJavaInfo("com.smartgwt.client.widgets.layout.SectionStackSection");
    assertTrue(flowContainer.validateComponent(newSection));
    flowContainer.command_CREATE(newSection, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    SectionStack stack = new SectionStack();",
        "    {",
        "      SectionStackSection sectionStackSection = new SectionStackSection('New Section');",
        "      stack.addSection(sectionStackSection);",
        "    }",
        "    rootPanel.add(stack, 41, 42);",
        "    stack.setSize('270px', '200px');",
        "  }",
        "}");
    // add widget on Section
    CanvasInfo newCanvas = createJavaInfo("com.smartgwt.client.widgets.Canvas");
    flowContainer_CREATE(newSection, newCanvas, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    SectionStack stack = new SectionStack();",
        "    {",
        "      SectionStackSection sectionStackSection = new SectionStackSection('New Section');",
        "      {",
        "        Canvas canvas = new Canvas();",
        "        sectionStackSection.addItem(canvas);",
        "      }",
        "      stack.addSection(sectionStackSection);",
        "    }",
        "    rootPanel.add(stack, 41, 42);",
        "    stack.setSize('270px', '200px');",
        "  }",
        "}");
    newSection.getPropertyByTitle("expanded").setValue(false);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    SectionStack stack = new SectionStack();",
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

            "  }",
            "}");
    WidgetInfo panel = frame.getChildrenWidgets().get(0);
    WidgetInfo existingButton = panel.getChildren(WidgetInfo.class).get(0);
    // begin creating Button
    JavaInfo newButton = loadCreationTool("com.google.gwt.user.client.ui.Button");
    // move on "panel": feedback appears, command not null
    canvas.moveTo(existingButton, 0, 0);
    canvas.assertFeedbacks(canvas.getLinePredicate(existingButton, IPositionConstants.LEFT));
    canvas.assertCommandNotNull();
    // click, so finish creation
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

        "  {new: com.gwtext.client.widgets.Toolbar} {local-unique: toolbar} {/new Toolbar()/ /toolbar.setAutoHeight(true)/ /toolbar.addButton(button)/ /add(toolbar)/}",
        "    {new: com.gwtext.client.widgets.ToolbarMenuButton} {local-unique: button} {/new ToolbarMenuButton()/ /button.setMenu(menu)/ /toolbar.addButton(button)/}",
        "      {new: com.gwtext.client.widgets.menu.Menu} {local-unique: menu} {/new Menu()/ /menu.addSeparator()/ /button.setMenu(menu)/}",
        "        {void} {void} {/menu.addSeparator()/}");
    // find addSeparator()
    JavaInfo separator;
    {
      ContainerInfo toolbar = (ContainerInfo) panel.getChildrenWidgets().get(0);
      WidgetInfo button = toolbar.getChildrenWidgets().get(0);
      MenuInfo menu = button.getChildren(MenuInfo.class).get(0);
      separator = menu.getChildrenJava().get(0);
    }
    // check properties
    Property[] properties = separator.getProperties();
    assertThat(properties).isEmpty();
  }
View Full Code Here

Examples of org.jamesii.core.util.info.JavaInfo

      masterServerAddress =
          "rmi://localhost:" + MasterServer.DEFAULT_PORT + "/"
              + MasterServer.DEFAULT_BINDING_NAME;
    }
    if (capacity == null) {
      JavaInfo info = new JavaInfo();
      capacity = info.getCpus();
    }

    compManager = new ComputationManagement(capacity);

    SimSystem.report(Level.INFO, "Registering at master server: "
View Full Code Here

Examples of org.jamesii.core.util.info.JavaInfo

    setTitle(serverName + ":" + getTitle());
  }

  @Override
  public JComponent createContent() {
    JavaInfo info = new JavaInfo();
    if (server != null) {
      try {
        info = server.getVMinfo();
      } catch (RemoteException e) {
        SimSystem.report(e);
View Full Code Here

Examples of org.jamesii.core.util.info.JavaInfo

   *         virtual machine.
   */
  public static String getVMInfo() {
    String s = "Information about the virtual machine";

    s += new JavaInfo().toString();

    return s;
  }
View Full Code Here

Examples of org.jamesii.core.util.info.JavaInfo

    // the current state of this instance (of the experiment as such)
    if (getDataStorageFactory() != null) {
      IDataStorage<?> ds = getDataStorageFactory().getInstance();
      if (ds != null) {
        ds.writeExperimentSystemInformation(currentExperimentID, -1,
            SimSystem.VERSION, new JavaInfo());
        ds.storeExperiment(this);
      }
    }

    SimSystem.report(Level.CONFIG, "The experiment with uid "
        + currentExperimentID + " has been started using " + SimSystem.VERSION
        + " on machine " + new JavaInfo());
  }
View Full Code Here

Examples of org.jamesii.core.util.info.JavaInfo

  public void testExperimentSystemInformation() throws Exception {
    IUniqueID uid = UniqueIDGenerator.createUniqueID();
    Serializable expid = getDataStorage().setExperimentID(uid);
    long mid = 987987;
    String version = "AlphaBetaGamma123";
    JavaInfo ji1 = new JavaInfo();
    getDataStorage().writeExperimentSystemInformation(uid, mid, version, ji1);
    SystemInformation si =
        getDataStorage().getExperimentSystemInformation(expid);
    // go through the attributes of the SystemInformation items:
    assertEquals(mid, si.getMachineId());
    assertEquals(version, si.getJamesVersion());
    JavaInfo ji2 = si.getJavaInfo();
    assertEquals(ji1.getName(), ji2.getName());
    assertEquals(ji1.getVersion(), ji2.getVersion());
    assertEquals(ji1.getVendor(), ji2.getVendor());
    assertEquals(ji1.getInstDir(), ji2.getInstDir());
    assertEquals(ji1.getClassFormatVersion(), ji2.getClassFormatVersion());
    assertEquals(ji1.getClassPath(), ji2.getClassPath());
    assertEquals(ji1.getExtensionDir(), ji2.getExtensionDir());
    assertEquals(ji1.getSessionStarted(), ji2.getSessionStarted());
    assertEquals(ji1.getUpTime(), ji2.getUpTime());
    assertEquals(ji1.getOs(), ji2.getOs());
    assertEquals(ji1.getOsVersion(), ji2.getOsVersion());
    assertEquals(ji1.getOsArch(), ji2.getOsArch());
    assertEquals(ji1.getCpus(), ji2.getCpus());
    assertEquals(ji1.getTotalMemory(), ji2.getTotalMemory());
    assertEquals(ji1.getFreeMemory(), ji2.getFreeMemory());
    assertEquals(ji1.getMaxMemory(), ji2.getMaxMemory());
    assertEquals(ji1.getThreads(), ji2.getThreads());
    assertEquals(ji1.getUserName(), ji2.getUserName());
    assertEquals(ji1.getUserHome(), ji2.getUserHome());
    assertEquals(ji1.getUserWorkingDir(), ji2.getUserWorkingDir());

    // now check what happens, if one of the parameters reference null:
    expid =
        getDataStorage().setExperimentID(
            uid = UniqueIDGenerator.createUniqueID());
View Full Code Here

Examples of org.jamesii.core.util.info.JavaInfo

  public ParallelComputationTaskRunner(int maxThreads) throws RemoteException {

    int threadCount = maxThreads;
    if (maxThreads < 0) {
      // relative interpretation: use all but -maxThreads-1 cores
      JavaInfo info = new JavaInfo();
      threadCount = info.getCpus() + 1 + maxThreads;
    }
    // in rare cases (one cpu, maxThreads < -1) we might end up with too few
    // threads, let's use at least a single one then
    if (threadCount <= 0) {
      threadCount = 1;
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.