Examples of StructureNode


Examples of ch.uzh.ifi.seal.changedistiller.structuredifferencing.StructureNode

    @Test
    public void staticFieldModifierShouldBeConverted() throws Exception {
      File left = CompilationUtils.getFile(TEST_DATA + "TestLeft.java");
      ASTHelper<StructureNode> astHelper = getHelper(left);
      StructureNode structureTree = astHelper.createStructureTree();
      StructureNode classNode = findNode(structureTree, "sField : String");
      assertThat(astHelper.createStructureEntityVersion(classNode).isStatic(), is(true));
    }
View Full Code Here

Examples of ch.uzh.ifi.seal.changedistiller.structuredifferencing.StructureNode

    @Test
    public void volatileFieldModifierShouldBeConverted() throws Exception {
      File left = CompilationUtils.getFile(TEST_DATA + "TestLeft.java");
      ASTHelper<StructureNode> astHelper = getHelper(left);
      StructureNode structureTree = astHelper.createStructureTree();
      StructureNode classNode = findNode(structureTree, "vField : int");
      assertThat(astHelper.createStructureEntityVersion(classNode).isVolatile(), is(true));
    }
View Full Code Here

Examples of ch.uzh.ifi.seal.changedistiller.structuredifferencing.StructureNode

    @Test
    public void synchronizedFieldModifierShouldBeConverted() throws Exception {
      File left = CompilationUtils.getFile(TEST_DATA + "TestLeft.java");
      ASTHelper<StructureNode> astHelper = getHelper(left);
      StructureNode structureTree = astHelper.createStructureTree();
      StructureNode classNode = findNode(structureTree, "synchField : long");
      assertThat(astHelper.createStructureEntityVersion(classNode).isSynchronized(), is(true));
    }
View Full Code Here

Examples of ch.uzh.ifi.seal.changedistiller.structuredifferencing.StructureNode

    @Test
    public void transientFieldModifierShouldBeConverted() throws Exception {
      File left = CompilationUtils.getFile(TEST_DATA + "TestLeft.java");
      ASTHelper<StructureNode> astHelper = getHelper(left);
      StructureNode structureTree = astHelper.createStructureTree();
      StructureNode classNode = findNode(structureTree, "tField : String");
      assertThat(astHelper.createStructureEntityVersion(classNode).isTransient(), is(true));
    }
View Full Code Here

Examples of ch.uzh.ifi.seal.changedistiller.structuredifferencing.StructureNode

    private StructureNode findNode(StructureNode root, String name) {
        for (StructureNode node : root.getChildren()) {
            if (node.getName().equals(name)) {
                return node;
            }
            StructureNode child = findNode(node, name);
            if (child != null) {
                return child;
            }
        }
        return null;
View Full Code Here

Examples of net.sf.rej.gui.structure.StructureNode

      AttributesNode an = (AttributesNode) aNode.getParent();
      Range range = getRange(an);
      Map<Object, Range> map = an.getAttributesObject().getOffsetMap(range.getOffset());
      return map.get(aNode.getAttributeObject());
    } else if (node instanceof AttributesNode) {
      StructureNode parent = (StructureNode) node.getParent();
      if (parent instanceof ClassFileNode) {
        return this.offsets.get(ClassFile.OffsetTag.ATTRIBUTES);
      } else if (parent instanceof MethodNode) {
        MethodNode mNode = (MethodNode) parent;
        Range parentRange = getRange(parent);
View Full Code Here

Examples of net.sf.rej.gui.structure.StructureNode

            return; // early return
          }
         
          Object obj = path.getLastPathComponent();
          if (obj instanceof StructureNode) {
            StructureNode sn = (StructureNode) obj;
            JPopupMenu menu = sn.getContextMenu();
            if (menu != null) {
              menu.show(tree, me.getX(), me.getY());
            }
          }
        }
View Full Code Here

Examples of net.sf.rej.gui.structure.StructureNode

    }
   
    public void refresh() {
    if (this.cf != null) {
      StructureNode root = new ClassFileNode(this.cf);
      this.tree.setModel(new DefaultTreeModel(root));
      this.offsets = this.cf.getOffsetMap();
      if (this.sync != null) {
        this.sync.setOffsets(this.offsets);
        splitSynchronize();
View Full Code Here

Examples of net.sf.rej.gui.structure.StructureNode

 
  private void splitSynchronize() {
    if (this.sync != null && isOpen) {
      TreePath path = this.tree.getSelectionPath();
      if (path != null) {
        StructureNode node = (StructureNode) path.getLastPathComponent();
        this.sync.sync(node);
      }
    }
  }
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.