Package net.cis.common.model.modeler

Examples of net.cis.common.model.modeler.Modeler


  public static List<CismodelNodeDescriptor> getModeler_1000SemanticChildren(
      View view) {
    if (!view.isSetElement()) {
      return Collections.emptyList();
    }
    Modeler modelElement = (Modeler) view.getElement();
    LinkedList<CismodelNodeDescriptor> result = new LinkedList<CismodelNodeDescriptor>();
    for (Iterator<?> it = modelElement.getEngineDevices().iterator(); it
        .hasNext();) {
      EngineDevice childElement = (EngineDevice) it.next();
      int visualID = CismodelVisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == EngineDeviceEditPart.VISUAL_ID) {
        result.add(new CismodelNodeDescriptor(childElement, visualID));
        continue;
      }
    }
    for (Iterator<?> it = modelElement.getShieldDevices().iterator(); it
        .hasNext();) {
      ShieldDevice childElement = (ShieldDevice) it.next();
      int visualID = CismodelVisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == ShieldDeviceEditPart.VISUAL_ID) {
        result.add(new CismodelNodeDescriptor(childElement, visualID));
        continue;
      }
    }
    for (Iterator<?> it = modelElement.getWeaponDevices().iterator(); it
        .hasNext();) {
      AbstractWeapon childElement = (AbstractWeapon) it.next();
      int visualID = CismodelVisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == BeamEditPart.VISUAL_ID) {
View Full Code Here


        Messages.CismodelDiagramEditorUtil_CreateDiagramCommandLabel,
        Collections.EMPTY_LIST) {
      protected CommandResult doExecuteWithResult(
          IProgressMonitor monitor, IAdaptable info)
          throws ExecutionException {
        Modeler model = createInitialModel();
        attachModelToResource(model, modelResource);

        Diagram diagram = ViewService.createDiagram(model,
            ModelerEditPart.MODEL_ID,
            CismodelDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
View Full Code Here

   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    Beam newElement = ShipdeviceFactory.eINSTANCE.createBeam();

    Modeler owner = (Modeler) getElementToEdit();
    owner.getWeaponDevices().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    EngineDevice newElement = ShipdeviceFactory.eINSTANCE
        .createEngineDevice();

    Modeler owner = (Modeler) getElementToEdit();
    owner.getEngineDevices().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    EnergyTorpedo newElement = ShipdeviceFactory.eINSTANCE
        .createEnergyTorpedo();

    Modeler owner = (Modeler) getElementToEdit();
    owner.getWeaponDevices().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    ShieldDevice newElement = ShipdeviceFactory.eINSTANCE
        .createShieldDevice();

    Modeler owner = (Modeler) getElementToEdit();
    owner.getShieldDevices().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    MassDriver newElement = ShipdeviceFactory.eINSTANCE.createMassDriver();

    Modeler owner = (Modeler) getElementToEdit();
    owner.getWeaponDevices().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    Pulse newElement = ShipdeviceFactory.eINSTANCE.createPulse();

    Modeler owner = (Modeler) getElementToEdit();
    owner.getWeaponDevices().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    Missile newElement = ShipdeviceFactory.eINSTANCE.createMissile();

    Modeler owner = (Modeler) getElementToEdit();
    owner.getWeaponDevices().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    Ship newElement = StructureFactory.eINSTANCE.createShip();

    Modeler owner = (Modeler) getElementToEdit();
    owner.getShips().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

TOP

Related Classes of net.cis.common.model.modeler.Modeler

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.