Home
last modified time | relevance | path

Searched refs:doc (Results 1 – 25 of 37) sorted by relevance

12

/sdk/apps/DeviceConfig/src/com/example/android/deviceconfig/
DConfigGenerator.java172 Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); in generateConfig() local
174 Element devices = doc.createElement(PREFIX + NODE_DEVICES); in generateConfig()
178 doc.appendChild(devices); in generateConfig()
180 Element device = doc.createElement(PREFIX + NODE_DEVICE); in generateConfig()
183 Element name = doc.createElement(PREFIX + NODE_NAME); in generateConfig()
185 name.appendChild(doc.createTextNode(android.os.Build.MODEL)); in generateConfig()
186 Element manufacturer = doc.createElement(PREFIX + NODE_MANUFACTURER); in generateConfig()
188 manufacturer.appendChild(doc.createTextNode(android.os.Build.MANUFACTURER)); in generateConfig()
190 Element hardware = doc.createElement(PREFIX + NODE_HARDWARE); in generateConfig()
193 Element screen = doc.createElement(PREFIX + NODE_SCREEN); in generateConfig()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/
DAndroidXmlAutoEditStrategy.java87 IStructuredDocument doc = (IStructuredDocument) document; in customizeDocumentCommand() local
91 && TextUtilities.endsWith(doc.getLegalLineDelimiters(), c.text) != -1) { in customizeDocumentCommand()
94 IStructuredModel model = modelManager.getModelForRead(doc); in customizeDocumentCommand()
98 int lineStart = findLineStart(doc, offset); in customizeDocumentCommand()
99 int textStart = findTextStart(doc, lineStart, offset); in customizeDocumentCommand()
101 IStructuredDocumentRegion region = doc.getRegionAtCharacterOffset(textStart); in customizeDocumentCommand()
103 Pair<Integer,Integer> balance = getBalance(doc, textStart, offset); in customizeDocumentCommand()
109 lineIndent = doc.get(lineStart, textStart - lineStart); in customizeDocumentCommand()
122 ITextRegion left = getRegionAt(doc, offset, true /*biasLeft*/); in customizeDocumentCommand()
133 ITextRegion right = getRegionAt(doc, offset, false /*biasLeft*/); in customizeDocumentCommand()
[all …]
DAndroidXmlCharacterMatcher.java46 public IRegion match(IDocument doc, int offset) { in match() argument
47 if (offset < 0 || offset >= doc.getLength()) { in match()
51 IRegion match = findOppositeTag(doc, offset); in match()
56 return super.match(doc, offset); in match()
63 IStructuredDocument doc = (IStructuredDocument) document; in findOppositeTag() local
65 IStructuredDocumentRegion region = doc.getRegionAtCharacterOffset(offset); in findOppositeTag()
91 region = doc.getRegionAtCharacterOffset(offset); in findOppositeTag()
121 int target = findTagForwards(doc, subRegion.getStart() + region.getStartOffset(), 0); in findOppositeTag()
129 int target = findTagBackwards(doc, subRegion.getStart() + region.getStartOffset(), -1); in findOppositeTag()
145 public static int findTagBackwards(IStructuredDocument doc, int offset, int targetTagBalance) { in findTagBackwards() argument
[all …]
DCompletionProposal.java174 String doc = source.substring(start, start + length); in getAdditionalProposalInfo() local
175 return doc; in getAdditionalProposalInfo()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/export/
DAbstractPropertiesFieldsPart.java146 IDocument doc = mEditor.getDocument(); in saveFieldsToModel() local
147 int numLines = doc.getNumberOfLines(); in saveFieldsToModel()
151 delim = numLines > 0 ? doc.getLineDelimiter(0) : null; in saveFieldsToModel()
162 IRegion info = doc.getLineInformation(i); in saveFieldsToModel()
163 String line = doc.get(info.getOffset(), info.getLength()); in saveFieldsToModel()
183 doc.replace(info.getOffset(), info.getLength(), line); in saveFieldsToModel()
207 numLines = doc.getNumberOfLines(); in saveFieldsToModel()
209 IRegion info = numLines > 0 ? doc.getLineInformation(numLines - 1) : null; in saveFieldsToModel()
212 doc.replace(info.getOffset(), info.getLength(), line); in saveFieldsToModel()
215 String eofDelim = doc.getLineDelimiter(numLines - 1); in saveFieldsToModel()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/uimodel/
DUiTextValueNode.java106 Document doc = element.getOwnerDocument(); in commit() local
107 if (doc != null) { in commit()
108 Text text = doc.createTextNode(value); in commit()
DUiElementNode.java940 Document doc = getXmlDocument(); in createXmlNode() local
943 if (doc == null) { in createXmlNode()
951 parentXmlNode = doc; in createXmlNode()
954 mXmlNode = doc.createElement(elementName); in createXmlNode()
1041 Text indentNode = doc.createTextNode(newLine + indent); in createXmlNode()
1051 Text sep = doc.createTextNode(newLine + insertAfter); in createXmlNode()
1063 Attr attr = doc.createAttributeNS(SdkConstants.XMLNS_URI, in createXmlNode()
1573 Document doc = element.getOwnerDocument(); in commitAttributeToXml() local
1574 if (doc != null) { in commitAttributeToXml()
1579 attr = doc.createAttributeNS(attrNsUri, attrLocalName); in commitAttributeToXml()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/tests/functests/sampleProjects/
DAndroidManifestWriter.java57 private AndroidManifestWriter(Document doc, String osManifestFilePath) { in AndroidManifestWriter() argument
58 mDoc = doc; in AndroidManifestWriter()
118 Document doc = docBuilder.parse(osManifestFilePath); in parse() local
119 return new AndroidManifestWriter(doc, osManifestFilePath); in parse()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/otherxml/
DOtherXmlEditorDelegate.java101 Document doc = null; in delegateInitUiRootNode() local
103 doc = getUiRootNode().getXmlDocument(); in delegateInitUiRootNode()
119 onDescriptorsChanged(doc); in delegateInitUiRootNode()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/
DEclipseLintRunner.java59 @Nullable IDocument doc, in runLint() argument
62 LintJob job = (LintJob) startLint(resources, source, doc, fatalOnly, in runLint()
100 @Nullable IDocument doc, in startLint() argument
104 EclipseLintClient client = new EclipseLintClient(registry, resources, doc, fatalOnly); in startLint()
DEclipseLintClient.java575 private static Pair<Integer, Integer> getRange(IFile file, IDocument doc,
581 if (doc == null) {
585 doc = provider.getDocument(file);
586 if (doc != null) {
587 return adjustOffsets(doc, startOffset, endOffset);
595 return adjustOffsets(doc, startOffset, endOffset);
612 private static Pair<Integer, Integer> adjustOffsets(IDocument doc, int startOffset,
617 if (doc != null) {
618 while (endOffset > startOffset && endOffset < doc.getLength()) {
620 if (!Character.isWhitespace(doc.getChar(endOffset - 1))) {
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/menu/
DMenuEditorDelegate.java141 Document doc = null; in delegateInitUiRootNode() local
143 doc = getUiRootNode().getXmlDocument(); in delegateInitUiRootNode()
159 onDescriptorsChanged(doc); in delegateInitUiRootNode()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DLayoutMetadata.java244 Document doc = DomUtilities.getDocument(editor); in setPropertyInEditor() local
245 if (doc != null) { in setPropertyInEditor()
246 Element element = DomUtilities.findCorresponding(equivalentElement, doc); in setPropertyInEditor()
270 Document doc = DomUtilities.getDocument(variation); in setPropertyInFile() local
271 if (doc != null && element.getOwnerDocument() != doc) { in setPropertyInFile()
272 Element other = DomUtilities.findCorresponding(element, doc); in setPropertyInFile()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/
DVisualRefactoring.java347 IStructuredDocument doc, int skipStart, int skipEnd, in replaceIds() argument
369 IStructuredDocumentRegion region = doc.getFirstStructuredDocumentRegion(); in replaceIds()
699 IStructuredDocument doc = mDelegate.getEditor().getStructuredDocument(); in initElements() local
700 Pair<Element, Element> range = DomUtilities.getElementRange(doc, in initElements()
1000 IStructuredDocument doc = model.getStructuredDocument(); in replaceAttributeDeclaration() local
1002 IStructuredDocumentRegion region = doc.getRegionAtCharacterOffset(offset); in replaceAttributeDeclaration()
1090 IStructuredDocument doc = model.getStructuredDocument(); in removeElementTags() local
1091 if (doc != null) { in removeElementTags()
1093 IStructuredDocumentRegion region = doc.getRegionAtCharacterOffset(start); in removeElementTags()
1105 DeleteEdit deletion = createDeletion(doc, startOffset, endOffset); in removeElementTags()
[all …]
DRefactoringAssistant.java113 IStructuredDocument doc = model.getStructuredDocument(); in computeQuickAssistProposals() local
114 IStructuredDocumentRegion region = doc.getRegionAtCharacterOffset(offset); in computeQuickAssistProposals()
125 resource = RenameResourceXmlTextAction.findResource(doc, offset); in computeQuickAssistProposals()
144 resource = RenameResourceXmlTextAction.findResource(doc, offset); in computeQuickAssistProposals()
DChangeViewRefactoring.java198 IStructuredDocument doc = model.getStructuredDocument(); in computeChanges() local
199 if (doc != null) { in computeChanges()
203 List<TextEdit> replaceIds = replaceIds(getAndroidNamespacePrefix(), doc, in computeChanges()
DWrapInRefactoring.java220 IStructuredDocument doc = model.getStructuredDocument(); in computeChanges() local
221 if (doc != null) { in computeChanges()
223 doc, mSelectionStart, mSelectionEnd, rootId, id); in computeChanges()
DUseCompoundDrawableRefactoring.java343 IStructuredDocument doc = model.getStructuredDocument(); in computeChanges() local
344 if (doc != null) { in computeChanges()
346 doc, mSelectionStart, mSelectionEnd, layoutId, id); in computeChanges()
DExtractIncludeRefactoring.java366 IStructuredDocument doc = model.getStructuredDocument(); in handleIncludingFile() local
367 if (doc != null && rootId != null) { in handleIncludingFile()
368 List<TextEdit> replaceIds = replaceIds(androidNsPrefix, doc, begin, in handleIncludingFile()
375 MultiTextEdit formatted = reformat(doc.get(), rootEdit, in handleIncludingFile()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/
DTemplateManager.java244 Document doc = DomUtilities.parseDocument(xml, true); in getTemplate() local
245 if (doc != null && doc.getDocumentElement() != null) { in getTemplate()
246 TemplateMetadata metadata = new TemplateMetadata(doc); in getTemplate()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/
DImportedProject.java167 Document doc = DomUtilities.parseDocument(xml, false); in findEclipseProjectName() local
168 if (doc != null) { in findEclipseProjectName()
169 NodeList names = doc.getElementsByTagName(ATTR_NAME); in findEclipseProjectName()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/
DXmlStringFileHelper.java114 IDOMDocument doc = ((IDOMModel) smodel).getDocument(); in internalGetResIdsForFile() local
121 Node root = findChild(doc, null, SdkConstants.TAG_RESOURCES); in internalGetResIdsForFile()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/
DUiElementPullParser.java300 Document doc = mRoot.getXmlDocument(); in getAttributePrefix() local
301 return doc.lookupPrefix(ANDROID_URI); in getAttributePrefix()
449 Document doc = mRoot.getXmlDocument(); in getPrefix() local
450 return doc.lookupPrefix(getCurrentNode().getDescriptor().getNamespace()); in getPrefix()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/
DAaptQuickFix.java222 private IndexedRegion perform(IDocument doc) { in perform() argument
224 IStructuredModel model = manager.getExistingModelForEdit(doc); in perform()
297 public Point getSelection(IDocument doc) { in getSelection() argument
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/resources/platform/
DAttributeInfoTest.java334 Document doc = DomUtilities.parseDocument(xml, false); in checkXmlFile() local
335 if (doc != null && doc.getDocumentElement() != null) { in checkXmlFile()
336 checkElement(file, doc.getDocumentElement(), map, seen); in checkXmlFile()

12