Home
last modified time | relevance | path

Searched refs:Node (Results 1 – 25 of 94) sorted by relevance

1234

/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/mock/
DMockNamedNodeMap.java21 import org.w3c.dom.Node;
29 private final HashMap<String, HashMap<String, Node>> mNodeMap =
30 new HashMap<String, HashMap<String, Node>>();
33 private final ArrayList<Node> mNodeList = new ArrayList<Node>();
43 HashMap<String, Node> map = mNodeMap.get(namespace); in addAttribute()
45 map = new HashMap<String, Node>(); in addAttribute()
64 public Node getNamedItem(String name) { in getNamedItem()
65 HashMap<String, Node> map = mNodeMap.get(""); // no namespace in getNamedItem()
74 public Node getNamedItemNS(String namespaceURI, String localName) throws DOMException { in getNamedItemNS()
79 HashMap<String, Node> map = mNodeMap.get(namespaceURI); in getNamedItemNS()
[all …]
DMockXmlNode.java22 import org.w3c.dom.Node;
32 public class MockXmlNode implements Node {
76 mNodeType = Node.ATTRIBUTE_NODE; in MockXmlNode()
123 public Node appendChild(Node newChild) throws DOMException { in appendChild()
139 public Node getFirstChild() { in getFirstChild()
147 public Node getLastChild() { in getLastChild()
155 public Node getNextSibling() { in getNextSibling()
175 public Node getParentNode() { in getParentNode()
180 public Node getPreviousSibling() { in getPreviousSibling()
195 public boolean isSameNode(Node other) { in isSameNode()
[all …]
DMockNodeList.java19 import org.w3c.dom.Node;
52 public Node item(int index) { in item()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/
DExplodedRenderingHelper.java28 import org.w3c.dom.Node;
65 public ExplodedRenderingHelper(Node root, IProject iProject) { in ExplodedRenderingHelper()
87 public ExplodedRenderingHelper(Node root, Set<String> layoutNames) { in ExplodedRenderingHelper()
115 private void computePadding(Node view, int[] padding) { in computePadding()
123 Map<Node, int[]> childrenPadding = new HashMap<Node, int[]>(count); in computePadding()
125 Node child = children.item(i); in computePadding()
127 if (type == Node.ELEMENT_NODE) { // ignore TEXT/CDATA nodes. in computePadding()
213 private void combineRelativeLayout(Map<Node, int[]> childrenPadding, int[] padding) { in combineRelativeLayout() argument
227 Set<Node> nodeSet = childrenPadding.keySet(); in combineRelativeLayout()
229 Map<String, Node> idNodeMap = computeIdNodeMap(nodeSet); in combineRelativeLayout()
[all …]
DUiElementPullParser.java53 import org.w3c.dom.Node;
143 private Node getAttribute(int i) { in getAttribute()
152 Node xmlNode = uiNode.getXmlNode(); in getAttribute()
173 Node padding = attributes.getNamedItemNS(ANDROID_URI, ATTR_PADDING); in push()
262 Node attribute = getAttribute(i); in getAttributeName()
284 Node attribute = getAttribute(i); in getAttributeNamespace()
307 Node attribute = getAttribute(i); in getAttributePrefix()
328 Node attribute = getAttribute(i); in getAttributeValue()
364 Node xmlNode = uiNode.getXmlNode(); in getAttributeValue()
374 Node attribute = xmlNode.getAttributes().getNamedItemNS(namespace, localName); in getAttributeValue()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/uimodel/
DUiTextValueNode.java22 import org.w3c.dom.Node;
45 public void updateValue(Node xml_attribute_node) { in updateValue()
54 Node xml_node = parent.getXmlNode(); in updateValue()
56 for (Node xml_child = xml_node.getFirstChild(); in updateValue()
59 if (xml_child.getNodeType() == Node.TEXT_NODE) { in updateValue()
87 Node element = parent.prepareCommit(); in commit()
94 for (Node xml_child = element.getFirstChild(); in commit()
97 if (xml_child.getNodeType() == Node.TEXT_NODE) { in commit()
DUiDocumentNode.java23 import org.w3c.dom.Node;
95 public boolean loadFromXmlNode(Node xml_node) { in loadFromXmlNode()
114 public Node createXmlNode() { in createXmlNode()
133 public Node deleteXmlNode() { in deleteXmlNode()
DUiElementNode.java58 import org.w3c.dom.Node;
111 private Node mXmlNode;
420 public Node getXmlNode() { in getXmlNode()
791 public UiElementNode findXmlNode(Node xmlNode) { in findXmlNode()
833 public boolean loadFromXmlNode(Node xmlNode) { in loadFromXmlNode()
857 public void reloadFromXmlNode(Node xmlNode) { in reloadFromXmlNode()
882 public Node prepareCommit() { in prepareCommit()
924 public Node createXmlNode() { in createXmlNode()
928 Node parentXmlNode = null; in createXmlNode()
965 Node xmlNextSibling = null; in createXmlNode()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DDomUtilities.java47 import org.w3c.dom.Node;
78 public static Node getCommonAncestor(@NonNull Node node1, @NonNull Node node2) { in getCommonAncestor()
80 Node current = node1; in getCommonAncestor()
101 public static List<Element> getAllElements(@NonNull Node node) { in getAllElements()
107 private static void addElements(@NonNull Node node, @NonNull List<Element> elements) { in addElements()
125 public static int getDepth(@NonNull Node node) { in getDepth()
141 public static boolean hasElementChildren(@NonNull Node node) { in hasElementChildren()
144 if (children.item(i).getNodeType() == Node.ELEMENT_NODE) { in hasElementChildren()
221 public static Node getNode(@NonNull IDocument document, int offset) { in getNode()
222 Node node = null; in getNode()
[all …]
DLayoutMetadata.java48 import org.w3c.dom.Node;
111 public static void clearLegacyComment(Node node) { in clearLegacyComment()
114 Node child = children.item(i); in clearLegacyComment()
115 if (child.getNodeType() == Node.COMMENT_NODE) { in clearLegacyComment()
118 Node commentNode = child; in clearLegacyComment()
120 Node previous = commentNode.getPreviousSibling(); in clearLegacyComment()
121 if (previous != null && previous.getNodeType() == Node.TEXT_NODE) { in clearLegacyComment()
127 Node first = node.getFirstChild(); in clearLegacyComment()
129 && first.getNodeType() == Node.TEXT_NODE) { in clearLegacyComment()
148 @NonNull Node node, in getProperty()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/manifest/model/
DUiElementNodeTest.java28 import org.w3c.dom.Node;
101 MockXmlNode root = new MockXmlNode(null /* namespace */, "manifest", Node.ELEMENT_NODE, in testMandatoryOrder()
103 new MockXmlNode(null /* namespace */, "application", Node.ELEMENT_NODE, null) in testMandatoryOrder()
122 MockXmlNode root = new MockXmlNode(null /* namespace */, "blah", Node.ELEMENT_NODE, null); in testLoadFrom_InvalidRoot()
132 MockXmlNode root = new MockXmlNode(null /* namespace */, "manifest", Node.ELEMENT_NODE, in testLoadFrom_NewTree_1_Node()
134 new MockXmlNode(null /* namespace */, "application", Node.ELEMENT_NODE, null) in testLoadFrom_NewTree_1_Node()
153 MockXmlNode root = new MockXmlNode(null /* namespace */, "manifest", Node.ELEMENT_NODE, in testLoadFrom_NewTree_2_Nodes()
155 new MockXmlNode(null /* namespace */, "application", Node.ELEMENT_NODE, null), in testLoadFrom_NewTree_2_Nodes()
156 new MockXmlNode(null /* namespace */, "permission", Node.ELEMENT_NODE, null), in testLoadFrom_NewTree_2_Nodes()
182 MockXmlNode root = new MockXmlNode(null /* namespace */, "manifest", Node.ELEMENT_NODE, in testLoadFrom_NewTree_N_Nodes()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/resources/platform/
DAttrsXmlParser.java29 import org.w3c.dom.Node;
166 Node res = doc.getFirstChild(); in preload()
168 res.getNodeType() != Node.ELEMENT_NODE && in preload()
278 private void parseResources(Node res) { in parseResources()
282 Node lastComment = null; in parseResources()
283 for (Node node = res.getFirstChild(); node != null; node = node.getNextSibling()) { in parseResources()
285 case Node.COMMENT_NODE: in parseResources()
288 case Node.ELEMENT_NODE: in parseResources()
290 Node nameNode = node.getAttributes().getNamedItem("name"); //$NON-NLS-1$ in parseResources()
294 Node parentNode = node.getAttributes().getNamedItem("parent"); //$NON-NLS-1$ in parseResources()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/
DXmlStringFileHelper.java31 import org.w3c.dom.Node;
121 Node root = findChild(doc, null, SdkConstants.TAG_RESOURCES); in internalGetResIdsForFile()
123 for (Node strNode = findChild(root, null, in internalGetResIdsForFile()
129 Node nameAttr = attrs.getNamedItem(SdkConstants.ATTR_NAME); in internalGetResIdsForFile()
136 for (Node txtNode = strNode.getFirstChild(); in internalGetResIdsForFile()
137 txtNode != null && txtNode.getNodeType() == Node.TEXT_NODE; in internalGetResIdsForFile()
169 private Node findChild(Node parent, Node lastChild, String elementName) { in findChild()
177 if (lastChild.getNodeType() == Node.ELEMENT_NODE && in findChild()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/pages/
DApplicationToggle.java40 import org.w3c.dom.Node;
150 private Node mUndoXmlNode;
151 private Node mUndoXmlParent;
152 private Node mUndoXmlNextNode;
153 private Node mUndoXmlNextElement;
217 Node next = mUndoXmlNextNode; in restoreApplicationNode()
246 private Node validateNode(Node root_node, Node xml_node) { in validateNode()
250 for (Node node = root_node.getFirstChild(); node != null; in validateNode()
267 Node xml_node = getUiElementNode().getXmlNode(); in removeApplicationNode()
278 mUndoXmlNextElement.getNodeType() != Node.ELEMENT_NODE) { in removeApplicationNode()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/tree/
DUiActions.java30 import org.w3c.dom.Node;
199 final Node[] selectXmlNode = { null }; in doUp()
249 final Node[] selectXmlNode = { null }; in canDoUp()
271 Node[] outSelectXmlNode, in doUpInternal()
279 Node xmlNode = uiNode.getXmlNode(); in doUpInternal()
285 Node xmlParent = uiParentNode == null ? null : uiParentNode.getXmlNode(); in doUpInternal()
301 Node xmlPrev = uiPrev.getXmlNode(); in doUpInternal()
323 Node xmlGrandParent = uiGrandParent == null ? null : uiGrandParent.getXmlNode(); in doUpInternal()
380 final Node[] selectXmlNode = { null }; in doDown()
430 final Node[] selectXmlNode = { null }; in canDoDown()
[all …]
DPasteAction.java34 import org.w3c.dom.Node;
82 Node xml_node = mUiNode.getUiChildren().get(0).getXmlNode(); in run()
93 Node xml_node = mUiNode.getXmlNode(); in run()
111 Node xml_node = mUiNode.getXmlNode(); in run()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/
DAndroidContentAssist.java64 import org.w3c.dom.Node;
159 Pair<Node, Node> context = DomUtilities.getNodeContext(viewer.getDocument(), offset); in computeCompletionProposals()
163 Node parentNode = context.getFirst(); in computeCompletionProposals()
164 Node currentNode = context.getSecond(); in computeCompletionProposals()
168 if (currentNode == null || currentNode.getNodeType() == Node.TEXT_NODE) { in computeCompletionProposals()
173 } else if (currentNode.getNodeType() == Node.ELEMENT_NODE) { in computeCompletionProposals()
193 List<ICompletionProposal> proposals, Node parentNode, Node currentNode, String parent, in computeNonAttributeProposals()
227 int offset, String wordPrefix, UiElementNode currentUiNode, Node parentNode, in computeAttributeProposals()
228 Node currentNode, String parent, AttribInfo info, char nextChar) { in computeAttributeProposals()
270 protected int computeTextReplaceLength(Node currentNode, int offset) { in computeTextReplaceLength()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/
DTypographyFix.java30 import org.w3c.dom.Node;
57 protected void apply(IDocument document, IStructuredModel model, Node node, int start, in apply()
64 Node child = childNodes.item(i); in apply()
65 if (child.getNodeType() == Node.TEXT_NODE) { in apply()
DDocumentFix.java27 import org.w3c.dom.Node;
36 protected abstract void apply(IDocument document, IStructuredModel model, Node node, in apply()
51 Node node = DomUtilities.getNode(document, start); in apply()
DEclipseLintClient.java98 import org.w3c.dom.Node;
126 private Map<Node, IMarker> mNodeMap;
188 public Collection<Node> getIssueNodes() { in getIssueNodes()
245 public @NonNull Location getLocation(@NonNull XmlContext context, @NonNull Node node) { in getXmlParser()
252 public @NonNull Location getLocation(@NonNull XmlContext context, @NonNull Node node, in getXmlParser()
269 public int getNodeStartOffset(@NonNull XmlContext context, @NonNull Node node) { in getXmlParser()
275 public int getNodeEndOffset(@NonNull XmlContext context, @NonNull Node node) { in getXmlParser()
282 final @NonNull Node node) { in getXmlParser()
299 public Location getNameLocation(@NonNull XmlContext context, @NonNull Node node) { in getXmlParser()
447 if (region instanceof Node) {
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/formatting/
DEclipseXmlPrettyPrinterTest.java26 import org.w3c.dom.Node;
69 Node startNode = document; in checkFormat()
70 Node endNode = document; in checkFormat()
86 private Node findNode(Node node, String nodeName) { in findNode()
93 Node child = children.item(i); in findNode()
94 Node result = findNode(child, nodeName); in findNode()
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/
DUiElementPullParserTest.java29 import org.w3c.dom.Node;
109 MockXmlNode button1 = new MockXmlNode(null /* namespace */, "Button", Node.ELEMENT_NODE, in setUp()
122 MockXmlNode button2 = new MockXmlNode(null /* namespace */, "Button", Node.ELEMENT_NODE, in setUp()
131 MockXmlNode text = new MockXmlNode(null /* namespace */, "TextView", Node.ELEMENT_NODE, in setUp()
141 Node.ELEMENT_NODE, new MockXmlNode[] { button2, text }); in setUp()
145 Node.ELEMENT_NODE, new MockXmlNode[] { button1, relative }); in setUp()
148 MockXmlNode root = new MockXmlNode(null /* namespace */, "root", Node.ELEMENT_NODE, in setUp()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/formatting/
DEclipseXmlPrettyPrinter.java36 import org.w3c.dom.Node;
99 public static String prettyPrint(@NonNull Node node, boolean endWithNewline) { in prettyPrint()
126 @NonNull Node node, in prettyPrint()
136 if (node.getNodeType() == Node.DOCUMENT_NODE && !xml.startsWith("<?")) { //$NON-NLS-1$ in prettyPrint()
144 protected String getSource(@NonNull Node node) { in getSource()
DAndroidXmlFormattingStrategy.java71 import org.w3c.dom.Node;
181 Node startNode = null; in format()
182 Node endNode = null; in format()
271 Node root = null; in format()
307 if (startNode.getNodeType() == Node.ELEMENT_NODE) { in format()
677 private final Node mStartNode;
678 private final Node mEndNode;
684 public IndentationMeasurer(Node mStartNode, Node mEndNode, IStructuredDocument document) { in IndentationMeasurer()
702 public String[] measure(int initialDepth, Node root) { in measure()
714 private void visit(int depth, Node node) { in visit()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/
DManifestEditor.java58 import org.w3c.dom.Node;
251 Node node = getManifestXmlNode(xmlDoc); in loadFromXml()
259 private Node getManifestXmlNode(Document xmlDoc) { in getManifestXmlNode()
266 Node node = xmlDoc.getDocumentElement(); in getManifestXmlNode()
274 if (node.getNodeType() == Node.ELEMENT_NODE && in getManifestXmlNode()
289 Node node = getManifestXmlNode(getXmlDocument(model)); in onDescriptorsChanged()
503 Node node = sibling.getXmlNode(); in addPermissions()
529 Node node = usesPermission.createXmlNode(); in addPermissions()
565 Node node = sibling.getXmlNode(); in removePermissions()

1234