/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ |
D | DomUtilitiesTest.java | 92 Document document = builder.newDocument(); in testIsContiguous() local 93 document.appendChild(document.createElement("root")); in testIsContiguous() 94 Element root = document.getDocumentElement(); in testIsContiguous() 95 root.appendChild(document.createTextNode(" ")); in testIsContiguous() 96 Element foo = document.createElement("foo"); in testIsContiguous() 98 root.appendChild(document.createTextNode(" ")); in testIsContiguous() 99 Element bar = document.createElement("bar"); in testIsContiguous() 101 Element baz = document.createElement("baz"); in testIsContiguous() 121 Document document = builder.newDocument(); in testGetCommonAncestor() local 129 document.appendChild(document.createElement("A")); in testGetCommonAncestor() [all …]
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/formatting/ |
D | AndroidXmlFormatter.java | 39 public final void format(IDocument document, IRegion region) { in format() argument 52 format(document, context); in format() 61 public void format(IDocument document, IFormattingContext context) { in format() argument 62 context.setProperty(FormattingContextProperties.CONTEXT_MEDIUM, document); in format() 63 formatMaster(context, document, 0, document.getLength()); in format() 66 protected void formatMaster(IFormattingContext context, IDocument document, int offset, in formatMaster() argument 69 final int delta= offset - document.getLineInformationOfOffset(offset).getOffset(); in formatMaster()
|
D | AndroidXmlFormattingStrategy.java | 66 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 67 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode; 130 IDocument document = mDocuments.poll(); in format() local 133 if (document != null && partition != null && mRegion != null) { in format() 135 if (document instanceof IStructuredDocument) { in format() 136 IStructuredDocument structuredDocument = (IStructuredDocument) document; in format() 146 edit.apply(document); in format() 179 IStructuredDocument document = model.getStructuredDocument(); in format() local 193 IStructuredDocumentRegion startRegion = document.getRegionAtCharacterOffset(start); in format() 206 IStructuredDocumentRegion endRegion = document.getRegionAtCharacterOffset(end); in format() [all …]
|
D | XmlFormatProcessor.java | 50 IStructuredDocument document = structuredModel.getStructuredDocument(); in formatModel() local 52 context.setProperty(CONTEXT_MEDIUM, document); in formatModel() 56 formatter.formatMaster(context, document, start, length); in formatModel()
|
D | EclipseXmlPrettyPrinter.java | 32 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement; 33 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode; 81 Document document = DomUtilities.parseStructuredDocument(xml); in prettyPrint() local 82 if (document != null) { in prettyPrint() 90 printer.prettyPrint(-1, document, null, null, sb, false /*openTagOnly*/); in prettyPrint()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/ |
D | DocumentFix.java | 36 protected abstract void apply(IDocument document, IStructuredModel model, Node node, in apply() argument 40 public void apply(IDocument document) { in apply() argument 41 if (!(document instanceof IStructuredDocument)) { in apply() 43 document.getClass().getName()); in apply() 50 IStructuredModel model = manager.getModelForEdit((IStructuredDocument) document); in apply() 51 Node node = DomUtilities.getNode(document, start); in apply() 53 apply(document, model, node, start, end); in apply()
|
D | DosLineEndingsFix.java | 47 public void apply(IDocument document) { in apply() argument 49 for (int i = document.getLength() - 1; i >= 0; i--) { in apply() 51 char c = document.getChar(i); in apply() 53 document.replace(i, 1, "\n"); //$NON-NLS-1$ in apply()
|
D | TypoFix.java | 59 protected void apply(IDocument document, IStructuredModel model, Node node, in apply() argument 72 String current = document.get(start, end-start); in apply() 74 document.replace(start, end - start, replacements.get(0)); in apply() 77 FindReplaceDocumentAdapter finder = new FindReplaceDocumentAdapter(document); in apply() 97 document.replace(start, end - start, replacements.get(0)); in apply()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/core/ |
D | RenameResourceXmlTextAction.java | 101 IDocument document = getDocument(); in run() local 102 if (document == null) { in run() 110 ResourceUrl resource = findResource(document, selection.getOffset()); in run() 113 resource = findItemDefinition(document, selection.getOffset()); in run() 126 String className = findClassName(document, file, selection.getOffset()); in run() 178 public static ResourceUrl findResource(@NonNull IDocument document, int offset) { in findResource() argument 180 int max = document.getLength(); in findResource() 188 char c = document.getChar(offset); in findResource() 197 char c = document.getChar(start); in findResource() 209 char c = document.getChar(end); in findResource() [all …]
|
D | RefactoringUtil.java | 60 public static void fixModel(IStructuredModel model, IDocument document) { in fixModel() argument 65 if (document == null) { in fixModel() 69 model = StructuredModelManager.getModelManager().getExistingModelForEdit(document); in fixModel() 129 @NonNull IDocument document) { in getAttributeValueRangeStart() argument 134 text = document.get(region.getStartOffset(), in getAttributeValueRangeStart() 157 @NonNull IDocument document) { in getTagNameRangeStart() argument 162 text = document.get(region.getStartOffset(), in getTagNameRangeStart()
|
D | AndroidTypeMoveParticipant.java | 65 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 233 IStructuredDocument document = model.getStructuredDocument(); in addXmlFileChanges() local 240 addManifestReplacements(edits, root, document); in addXmlFileChanges() 242 addLayoutReplacements(edits, root, document); in addXmlFileChanges() 275 @NonNull IStructuredDocument document) { in addLayoutReplacements() argument 278 int start = RefactoringUtil.getTagNameRangeStart(element, document); in addLayoutReplacements() 286 int start = RefactoringUtil.getAttributeValueRangeStart(classNode, document); in addLayoutReplacements() 298 int start = RefactoringUtil.getAttributeValueRangeStart(classNode, document); in addLayoutReplacements() 307 int start = RefactoringUtil.getAttributeValueRangeStart(classNode, document); in addLayoutReplacements() 319 addLayoutReplacements(edits, (Element) child, document); in addLayoutReplacements() [all …]
|
D | AndroidTypeRenameParticipant.java | 77 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 370 IStructuredDocument document = model.getStructuredDocument(); in addXmlFileChanges() local 378 addManifestReplacements(edits, root, document); in addXmlFileChanges() 380 addValueReplacements(edits, root, document); in addXmlFileChanges() 383 addLayoutReplacements(edits, root, document); in addXmlFileChanges() 416 @NonNull IStructuredDocument document) { in addLayoutReplacements() argument 419 int start = RefactoringUtil.getTagNameRangeStart(element, document); in addLayoutReplacements() 428 int start = RefactoringUtil.getAttributeValueRangeStart(classNode, document); in addLayoutReplacements() 440 int start = RefactoringUtil.getAttributeValueRangeStart(classNode, document); in addLayoutReplacements() 449 int start = RefactoringUtil.getAttributeValueRangeStart(classNode, document); in addLayoutReplacements() [all …]
|
D | AndroidPackageRenameParticipant.java | 77 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 122 Document document = DomUtilities.getDocument(mManifestFile); in checkConditions() local 123 if (document != null && document.getDocumentElement() != null) { in checkConditions() 124 Attr attribute = document.getDocumentElement().getAttributeNode(ATTR_PACKAGE); in checkConditions() 393 IStructuredDocument document = model.getStructuredDocument(); 400 addManifestReplacements(edits, root, document); 402 addLayoutReplacements(edits, root, document); 441 @NonNull IStructuredDocument document) { 444 int start = RefactoringUtil.getTagNameRangeStart(element, document); 467 int start = RefactoringUtil.getAttributeValueRangeStart(classNode, document); [all …]
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/refactorings/core/ |
D | RenameResourceXmlTextActionTest.java | 89 IDocument document = new Document(); in checkClassName() local 90 document.replace(0, 0, contents); in checkClassName() 92 RenameResourceXmlTextAction.findClassName(document, null, cursor); in checkClassName() 105 IDocument document = new Document(); in checkWord() local 106 document.replace(0, 0, contents); in checkWord() 107 ResourceUrl resource = RenameResourceXmlTextAction.findResource(document, cursor); in checkWord()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/ |
D | AaptQuickFix.java | 59 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 125 IDocument document = provider.getDocument(markerResource); in getResolutions() local 126 String resource = document.get(start, length); in getResolutions() 175 IDocument document = sourceViewer.getDocument(); in computeQuickAssistProposals() local 177 file, document, invocationContext.getOffset()); in computeQuickAssistProposals() 185 String resource = document.get(start, length); in computeQuickAssistProposals() 258 Document document = domModel.getDocument(); in perform() local 259 Element element = document.getDocumentElement(); in perform() 260 Attr attr = document.createAttributeNS(XMLNS_URI, XMLNS_ANDROID); in perform() 272 public void apply(IDocument document) { in apply() argument [all …]
|
D | ConvertSwitchQuickFixProcessor.java | 113 IDocument document = provider.getDocument(file); in getCorrections() local 114 if (document != null) { in getCorrections() 116 file, document, errorStart); in getCorrections() 187 public void apply(IDocument document) { in apply() argument 194 public Point getSelection(IDocument document) { in getSelection() argument
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/formatting/ |
D | AndroidXmlFormattingStrategyTest.java | 34 Document document = new Document(); in check() local 35 document.set(before); in check() 36 ReplaceEdit edit = AndroidXmlFormattingStrategy.createReplaceEdit(document, replaceStart, in check() 39 edit.apply(document); in check() 40 String contents = document.get(); in check()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/formatting/ |
D | EclipseXmlPrettyPrinterTest.java | 24 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 55 Document document = null; in checkFormat() local 58 document = domModel.getDocument(); in checkFormat() 63 XmlFormatStyle style = AndroidXmlFormattingStrategy.guessStyle(model, document); in checkFormat() 69 Node startNode = document; in checkFormat() 70 Node endNode = document; in checkFormat() 72 startNode = findNode(document.getDocumentElement(), startNodeName); in checkFormat() 75 endNode = findNode(document.getDocumentElement(), endNodeName); in checkFormat() 78 printer.prettyPrint(-1, document, startNode, endNode, sb, false/*openTagOnly*/); in checkFormat()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/ |
D | AndroidXmlAutoEditStrategyTest.java | 48 IDocument document = viewer.getDocument(); in checkInsertNewline() local 49 document.replace(0, document.getLength(), newDocumentContent); in checkInsertNewline() 61 s.customizeDocumentCommand(document, c); in checkInsertNewline() 68 document.replace(c.offset, c.length, c.text); in checkInsertNewline() 80 String text = document.get(); in checkInsertNewline()
|
D | HyperlinksTest.java | 252 IDocument document = null; in checkXmlNavigation() local 257 document = xmlEditor.getStructuredSourceViewer().getDocument(); in checkXmlNavigation() 269 document = textViewer.getDocument(); in checkXmlNavigation() 287 document = javaEditor.getDocumentProvider().getDocument(javaEditor.getEditorInput()); in checkXmlNavigation() 295 if (document != null && selection != null) { in checkXmlNavigation() 296 int lineStart = document.getLineInformationOfOffset(selection.x).getOffset(); in checkXmlNavigation() 297 IRegion lineEndInfo = document.getLineInformationOfOffset(selection.x + selection.y); in checkXmlNavigation() 299 String text = document.get(lineStart, lineEnd - lineStart); in checkXmlNavigation()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ |
D | RefactoringTest.java | 44 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 107 IDocument document = new Document(); in checkEdits() local 113 document.set(xml); in checkEdits() 124 edits.apply(document); in checkEdits() 126 edit.apply(document); in checkEdits() 133 String actual = document.get(); in checkEdits() 164 IDocument document = new Document(); in checkEdits() local 165 document.set(xml); in checkEdits() 167 String before = document.get(); in checkEdits() 172 edits.apply(document); in checkEdits() [all …]
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ |
D | RenderPreviewList.java | 106 Document document = DomUtilities.createEmptyDocument(); in save() local 107 if (document != null) { in save() 109 description.toXml(document); in save() 111 String xml = EclipseXmlPrettyPrinter.prettyPrint(document, true); in save() 120 Document document = DomUtilities.parseDocument(xml, true); in load() local 121 if (document == null || document.getDocumentElement() == null) { in load() 124 List<Element> elements = DomUtilities.getChildren(document.getDocumentElement()); in load()
|
D | DomUtilities.java | 41 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 221 public static Node getNode(@NonNull IDocument document, int offset) { in getNode() argument 228 IStructuredModel model = modelManager.getExistingModelForRead(document); in getNode() 275 public static Pair<Node, Node> getNodeContext(@NonNull IDocument document, int offset) { in getNodeContext() argument 282 IStructuredModel model = modelManager.getExistingModelForRead(document); in getNodeContext() 355 public static Node getNode(@NonNull IDocument document, int offset, boolean forward) { in getNode() argument 356 Node node = getNode(document, offset); in getNode() 391 public static Pair<Element, Element> getElementRange(@NonNull IDocument document, in getElementRange() argument 395 Node beginNode = getNode(document, beginOffset, true); in getElementRange() 398 endNode = getNode(document, endOffset, false); in getElementRange() [all …]
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/manifest/model/ |
D | UiElementNodeTest.java | 268 Document document = builder.newDocument(); in testCreateNameSpace() local 269 Element rootElement = document.createElement("root"); in testCreateNameSpace() 270 document.appendChild(rootElement); in testCreateNameSpace() 271 Element root = document.getDocumentElement(); in testCreateNameSpace() 272 root.appendChild(document.createTextNode(" ")); in testCreateNameSpace() 273 Element foo = document.createElement("foo"); in testCreateNameSpace() 275 root.appendChild(document.createTextNode(" ")); in testCreateNameSpace() 276 Element bar = document.createElement("bar"); in testCreateNameSpace() 278 Element baz = document.createElement("baz"); in testCreateNameSpace()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ |
D | AndroidXmlEditor.java | 90 import org.eclipse.wst.xml.core.internal.document.NodeContainer; 91 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; 895 IStructuredDocument document = getStructuredDocument(); 896 if (document != null) { 904 return mm.getModelForRead(document); 923 IStructuredDocument document = getStructuredDocument(); 924 if (document != null) { 932 return mm.getModelForEdit(document); 1346 IStructuredDocument document = getStructuredDocument(); 1350 } else if (xmlNode instanceof IndexedRegion && document != null) { [all …]
|