/** * Constructor taking a name and a flag whether to display fully qualified. * @param name Name of the symbol * @param displayFullyQualified True if should display fully qualified */ public ElementSymbol(String name, boolean displayFullyQualified) { super(name); setDisplayFullyQualified(displayFullyQualified); }
/** * Constructor taking a name and a flag whether to display fully qualified. * @param name Name of the symbol * @param displayFullyQualified True if should display fully qualified */ public ElementSymbol(String name, boolean displayFullyQualified) { super(name); setDisplayFullyQualified(displayFullyQualified); }
/** * Constructor taking a name and a flag whether to display fully qualified. * @param name Name of the symbol * @param displayFullyQualified True if should display fully qualified */ public ElementSymbol(String name, boolean displayFullyQualified) { super(name); setDisplayFullyQualified(displayFullyQualified); }
/** * This method will convert all elements in a command to their fully qualified name. * @param command Command to convert */ public static void fullyQualifyElements(Command command) { Collection<ElementSymbol> elements = ElementCollectorVisitor.getElements(command, false, true); for (ElementSymbol element : elements) { element.setDisplayFullyQualified(true); } }
/** * This method will convert all elements in a command to their fully qualified name. * @param command Command to convert */ public static void fullyQualifyElements(Command command) { Collection<ElementSymbol> elements = ElementCollectorVisitor.getElements(command, false, true); for (ElementSymbol element : elements) { element.setDisplayFullyQualified(true); } }
/** * This method will convert all elements in a command to their fully qualified name. * @param command Command to convert */ public static void fullyQualifyElements(Command command) { Collection<ElementSymbol> elements = ElementCollectorVisitor.getElements(command, false, true); for (ElementSymbol element : elements) { element.setDisplayFullyQualified(true); } }
@Test public void testClone5() { ElementSymbol e1 = sampleElement1(); ElementSymbol copy = e1.clone(); helpEquals(e1, copy, true); // Change original, clone shouldn't change String originalName = e1.getName(); assertTrue("Cloned value changed but should not have: ", copy.getName().equals(originalName)); //$NON-NLS-1$ GroupSymbol originalGroup = e1.getGroupSymbol(); e1.setGroupSymbol(new GroupSymbol("b")); //$NON-NLS-1$ assertTrue("Cloned value changed but should not have: ", copy.getGroupSymbol().equals(originalGroup)); //$NON-NLS-1$ boolean fullyQualified = e1.getDisplayFullyQualified(); e1.setDisplayFullyQualified(!fullyQualified); assertTrue("Cloned value changed but should not have: ", copy.getDisplayFullyQualified() == fullyQualified); //$NON-NLS-1$ }