コード例 #1
0
ファイル: MacroGroup.java プロジェクト: glumanda/grblrunner
  private void generateGcodeProgram() {

    LOG.debug("generateGcodeProgram:");

    gcodeProgram.clear();

    gcodeProgram.appendLine("(Macro for " + getTitle() + ")");
    gcodeProgram.appendLine("(generated " + getTimestamp() + ")");
    gcodeProgram.appendLine("G21");
    gcodeProgram.appendLine("G90");

    generateGcodeCore(gcodeProgram);

    if (gcodeGenerationError) {

      clear();

    } else {

      gcodeProgram.appendLine(
          "G0 Z"
              + String.format(
                  IConstant.FORMAT_COORDINATE, getDoublePreference(IPreferenceKey.Z_CLEARANCE)));
      gcodeProgram.appendLine("M5");

      gcodeProgram.parse();

      Text gcodeText = (Text) context.get(IConstant.MACRO_TEXT_ID);
      if (gcodeText != null) toolbox.gcodeToText(gcodeText, gcodeProgram);
    }

    eventBroker.send(IEvent.GCODE_MACRO_GENERATED, null);
    eventBroker.send(IEvent.REDRAW, null);
  }
コード例 #2
0
 public void revealElement(final RobotElement element) {
   if (dataProvider.isFilterSet() && !dataProvider.isProvided(element)) {
     final String topic =
         RobotSuiteEditorEvents.FORM_FILTER_SWITCH_REQUEST_TOPIC
             + "/"
             + RobotCasesSection.SECTION_NAME.replaceAll(" ", "_");
     eventBroker.send(
         topic, new FilterSwitchRequest(RobotCasesSection.SECTION_NAME.replaceAll(" ", "_"), ""));
   }
   CellEditorCloser.closeForcibly(table);
   selectionProvider.setSelection(new StructuredSelection(new Object[] {element}));
   setFocus();
 }
コード例 #3
0
  private void redrawGcode() {

    eventBroker.send(IEvent.REDRAW, null);
  }