Examples of addChange()


Examples of org.pentaho.reporting.designer.core.util.undo.UndoManager.addChange()

      }
      else
      {
        final ReportDocumentContext context = dragContext.getRenderContext();
        final UndoManager undo = context.getUndo();
        undo.addChange(Messages.getInstance().getString("TocElementDragHandler.UndoEntry"),
            new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
        parent.addElement(subReport);
      }

      dragContext.getRenderContext().getSelectionModel().setSelectedElements(new Object[]{subReport});
View Full Code Here

Examples of org.pentaho.reporting.designer.core.util.undo.UndoManager.addChange()

            (element.getObjectID(), metaData.getNameSpace(), metaData.getName(), attribute, value));
        element.setAttribute(metaData.getNameSpace(), metaData.getName(), value);
        changed = true;
      }
    }
    undo.addChange(Messages.getString("AttributeTableModel.UndoName"),
        new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));

    return changed;
  }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.util.undo.UndoManager.addChange()

            (element.getObjectID(), metaData.getNameSpace(), metaData.getName(), attribute, value));
        element.setAttribute(metaData.getNameSpace(), metaData.getName(), value);
        changed = true;
      }
    }
    undo.addChange(Messages.getString("VisualAttributeTableModel.UndoName"),
        new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));

    return changed;
  }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.util.undo.UndoManager.addChange()

          undos.add(new AttributeExpressionEditUndoEntry
              (element.getObjectID(), metaData.getNameSpace(), metaData.getName(), attribute, null));
          element.setAttributeExpression(metaData.getNameSpace(), metaData.getName(), null);
        }
      }
      undo.addChange(Messages.getString("VisualAttributeTableModel.UndoNameExpression"),
          new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));

    }
    return changed;
  }
View Full Code Here

Examples of org.teiid.query.sql.lang.Update.addChange()

    }
   
    @Test public void testUpdateWithOption() {
        Update update = new Update();    
        update.setGroup(new GroupSymbol("m.g")); //$NON-NLS-1$
        update.addChange(new ElementSymbol("a"), new Reference(0));
        Option option = new Option();
        option.setNoCache(true);
        Criteria crit = new CompareCriteria(new ElementSymbol("b"), CompareCriteria.EQ, new Reference(1)); //$NON-NLS-1$
        update.setCriteria(crit);
        TestParser.helpTest("UPDATE m.g SET a = ? WHERE b = ? OPTION NOCACHE"//$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.sql.lang.Update.addChange()

    @Test public void testShouldExecuteUpdate() throws Exception {
        Update update = new Update();
       
        update.setGroup(new GroupSymbol("test")); //$NON-NLS-1$
       
        update.addChange(new ElementSymbol("e1"), new Constant("1")); //$NON-NLS-1$ //$NON-NLS-2$
       
        assertTrue(RelationalNodeUtil.shouldExecute(update, false));
       
        update.setChangeList(new SetClauseList());
       
View Full Code Here

Examples of org.teiid.query.sql.lang.Update.addChange()

        from.addGroup(g);

        ElementSymbol e =  new ElementSymbol("foo"); //$NON-NLS-1$
        Update query = new Update();
        query.setGroup(g);
        query.addChange(e, new Constant("bar", String.class)); //$NON-NLS-1$
       
        helpTest("update x set \"foo\"='bar'"//$NON-NLS-1$
                 "UPDATE x SET foo = 'bar'"//$NON-NLS-1$
                 query);               
   
View Full Code Here

Examples of org.teiid.query.sql.lang.Update.addChange()

    }
 
  public void testUpdate1() {
    Update update = new Update();
    update.setGroup(new GroupSymbol("m.g1"));     //$NON-NLS-1$
    update.addChange(new ElementSymbol("e1"), new Constant("abc")); //$NON-NLS-1$ //$NON-NLS-2$
   
    helpTest(update, "UPDATE m.g1 SET e1 = 'abc'"); //$NON-NLS-1$
  }
 
  public void testUpdate2() {
View Full Code Here

Examples of org.teiid.query.sql.lang.Update.addChange()

  }
 
  public void testUpdate2() {
    Update update = new Update();
    update.setGroup(new GroupSymbol("m.g1"));     //$NON-NLS-1$
    update.addChange(new ElementSymbol("e1"), new Constant("abc")); //$NON-NLS-1$ //$NON-NLS-2$
    update.addChange(new ElementSymbol("e2"), new Constant("xyz")); //$NON-NLS-1$ //$NON-NLS-2$
   
    helpTest(update, "UPDATE m.g1 SET e1 = 'abc', e2 = 'xyz'"); //$NON-NLS-1$
  }
 
View Full Code Here

Examples of org.teiid.query.sql.lang.Update.addChange()

  }
 
  public void testVisitUpdate1() {
    Update update = new Update();
    update.setGroup(exampleGroup(true, 0));
    update.addChange(exampleElement(true, 0), new Constant("abc"));    //$NON-NLS-1$
    update.addChange(exampleElement(true, 1), new Constant("abc"));    //$NON-NLS-1$
    helpTest(update, getSymbolMap());
  }

  public void testVisitUpdate2() {
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.