Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 51) sorted by relevance

123

/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/
DAndroidXmlAutoEditStrategy.java97 final int offset = c.offset; in customizeDocumentCommand() local
98 int lineStart = findLineStart(doc, offset); in customizeDocumentCommand()
99 int textStart = findTextStart(doc, lineStart, offset); in customizeDocumentCommand()
103 Pair<Integer,Integer> balance = getBalance(doc, textStart, offset); in customizeDocumentCommand()
122 ITextRegion left = getRegionAt(doc, offset, true /*biasLeft*/); in customizeDocumentCommand()
133 ITextRegion right = getRegionAt(doc, offset, false /*biasLeft*/); in customizeDocumentCommand()
138 offset, targetBalance); in customizeDocumentCommand()
162 ITextRegion left = getRegionAt(doc, offset, true /*biasLeft*/); in customizeDocumentCommand()
163 ITextRegion right = getRegionAt(doc, offset, false /*biasLeft*/); in customizeDocumentCommand()
171 c.caretOffset = offset + sb.length(); 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()
59 private IRegion findOppositeTag(IDocument document, int offset) { in findOppositeTag() argument
65 IStructuredDocumentRegion region = doc.getRegionAtCharacterOffset(offset); in findOppositeTag()
70 ITextRegion subRegion = region.getRegionAtCharacterOffset(offset); in findOppositeTag()
86 (subRegion.getStart() + region.getStartOffset() == offset)) { in findOppositeTag()
90 offset--; in findOppositeTag()
91 region = doc.getRegionAtCharacterOffset(offset); in findOppositeTag()
[all …]
DAndroidContentAssist.java142 public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) { in computeCompletionProposals() argument
143 String wordPrefix = extractElementPrefix(viewer, offset); in computeCompletionProposals()
159 Pair<Node, Node> context = DomUtilities.getNodeContext(viewer.getDocument(), offset); in computeCompletionProposals()
171 computeTextValues(proposals, offset, parentNode, currentNode, parentUiNode, in computeCompletionProposals()
175 AttribInfo info = parseAttributeInfo(viewer, offset, offset - wordPrefix.length()); in computeCompletionProposals()
176 char nextChar = extractChar(viewer, offset); in computeCompletionProposals()
181 computeAttributeProposals(proposals, viewer, offset, wordPrefix, currentUiNode, in computeCompletionProposals()
184 computeNonAttributeProposals(viewer, offset, wordPrefix, proposals, parentNode, in computeCompletionProposals()
192 private void computeNonAttributeProposals(ITextViewer viewer, int offset, String wordPrefix, in computeNonAttributeProposals() argument
205 boolean isNew = replaceLength == 0 && nextNonspaceChar(viewer, offset) == '<'; in computeNonAttributeProposals()
[all …]
DHyperlinks.java580 private static void openPath(IPath filePath, IRegion region, int offset) { in openPath() argument
608 ste.selectAndReveal(offset, 0); in openPath()
1355 int offset = caretOffset; in detectHyperlinks() local
1356 while (offset > lineStart) { in detectHyperlinks()
1357 char c = document.getChar(offset); in detectHyperlinks()
1359 urlStart = offset; in detectHyperlinks()
1364 offset--; in detectHyperlinks()
1368 offset = caretOffset; in detectHyperlinks()
1369 while (offset < lineEnd) { in detectHyperlinks()
1370 if (!isValidResourceUrlChar(document.getChar(offset))) { in detectHyperlinks()
[all …]
DAndroidSourceViewerConfig.java184 public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) { in computeCompletionProposals() argument
185 ICompletionProposal[] result = mDelegate.computeCompletionProposals(viewer, offset); in computeCompletionProposals()
219 public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) { in computeContextInformation() argument
220 return mDelegate.computeContextInformation(viewer, offset); in computeContextInformation()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/core/
DRenameResourceXmlTextAction.java178 public static ResourceUrl findResource(@NonNull IDocument document, int offset) { in findResource() argument
181 if (offset >= max) { in findResource()
182 offset = max - 1; in findResource()
183 } else if (offset < 0) { in findResource()
184 offset = 0; in findResource()
185 } else if (offset > 0) { in findResource()
188 char c = document.getChar(offset); in findResource()
190 offset--; in findResource()
194 int start = offset; in findResource()
240 private ResourceUrl findItemDefinition(IDocument document, int offset) { in findItemDefinition() argument
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/formatting/
DAndroidXmlFormatter.java66 protected void formatMaster(IFormattingContext context, IDocument document, int offset, in formatMaster() argument
69 final int delta= offset - document.getLineInformationOfOffset(offset).getOffset(); in formatMaster()
70 offset -= delta; in formatMaster()
78 new TypedPosition(offset, length, IXMLPartitions.XML_DEFAULT)); in formatMaster()
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/util/
DPsdFile.java56 public void addLayer(String name, BufferedImage image, Point offset) { in addLayer() argument
57 addLayer(name, image, offset, true); in addLayer()
60 public void addLayer(String name, BufferedImage image, Point offset, boolean visible) { in addLayer() argument
61 mLayersInfo.addLayer(name, image, offset, visible); in addLayer()
62 if (visible) mGraphics.drawImage(image, null, offset.x, offset.y); in addLayer()
247 void addLayer(String name, BufferedImage image, Point offset, boolean visible) { in addLayer() argument
248 mLayers.add(new Layer(name, image, offset, visible)); in addLayer()
316 Layer(String name, BufferedImage image, Point offset, boolean visible) { in Layer() argument
326 mTop = offset.y; in Layer()
327 mLeft = offset.x; in Layer()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/
DTraceFileReader.java42 public GLMessage getMessageAtOffset(RandomAccessFile file, long offset) throws IOException { in getMessageAtOffset() argument
46 if (offset != -1) { in getMessageAtOffset()
47 file.seek(offset); in getMessageAtOffset()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/values/
DValuesContentAssist.java73 protected boolean computeAttributeValues(List<ICompletionProposal> proposals, int offset, in computeAttributeValues() argument
76 super.computeAttributeValues(proposals, offset, parentTagName, attributeName, node, in computeAttributeValues()
89 offset - wordPrefix.length(), // replacementOffset in computeAttributeValues()
129 addMatchingProposals(proposals, sorted.toArray(), offset, node, wordPrefix, in computeAttributeValues()
141 protected void computeTextValues(List<ICompletionProposal> proposals, int offset, in computeTextValues() argument
144 super.computeTextValues(proposals, offset, parentNode, currentNode, uiParent, in computeTextValues()
196 int replaceLength = computeTextReplaceLength(currentNode, offset); in computeTextValues()
197 addMatchingProposals(proposals, values, offset, currentNode, in computeTextValues()
233 int replaceLength = computeTextReplaceLength(currentNode, offset); in computeTextValues()
234 addMatchingProposals(proposals, choices, offset, currentNode, in computeTextValues()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/
DAndroidJarLoader.java408 int offset = 0; in readZipData()
412 int count = zis.read(data, offset, data_size - offset); in readZipData()
416 offset += count; in readZipData()
418 if (entrySize >= 1 && offset >= entrySize) { // we know the size and we're done in readZipData()
424 if (offset >= data_size) { in readZipData()
433 if (offset < data_size) { in readZipData()
435 byte[] temp = new byte[offset]; in readZipData()
436 if (offset > 0) { in readZipData()
437 System.arraycopy(data, 0, temp, 0, offset); in readZipData()
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/
DAndroidXmlAutoEditStrategyTest.java52 int offset = updateCaret(viewer, before); in checkInsertNewline() local
56 c.offset = offset; in checkInsertNewline()
68 document.replace(c.offset, c.length, c.text); in checkInsertNewline()
70 int caretOffset = c.offset + c.text.length(); in checkInsertNewline()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DDomUtilities.java221 public static Node getNode(@NonNull IDocument document, int offset) { in getNode() argument
231 for (; offset >= 0 && node == null; --offset) { in getNode()
232 node = (Node) model.getIndexedRegion(offset); in getNode()
275 public static Pair<Node, Node> getNodeContext(@NonNull IDocument document, int offset) { in getNodeContext() argument
285 for (; offset >= 0 && node == null; --offset) { in getNodeContext()
286 IndexedRegion indexedRegion = model.getIndexedRegion(offset); in getNodeContext()
299 doc.getRegionAtCharacterOffset(offset); in getNodeContext()
301 ITextRegion subRegion = region.getRegionAtCharacterOffset(offset); in getNodeContext()
310 if (previousRegion.getEndOffset() == offset) { in getNodeContext()
355 public static Node getNode(@NonNull IDocument document, int offset, boolean forward) { in getNode() argument
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/animator/
DAnimationContentAssist.java73 protected boolean computeAttributeValues(List<ICompletionProposal> proposals, int offset, in computeAttributeValues() argument
92 addMatchingProposals(proposals, interpolators.toArray(), offset, node, wordPrefix, in computeAttributeValues()
98 return super.computeAttributeValues(proposals, offset, parentTagName, attributeName, in computeAttributeValues()
156 addMatchingProposals(proposals, pairs.toArray(), offset, node, wordPrefix, in computeAttributeValues()
164 return super.computeAttributeValues(proposals, offset, parentTagName, attributeName, in computeAttributeValues()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/
DManifestContentAssist.java51 protected boolean computeAttributeValues(List<ICompletionProposal> proposals, int offset, in computeAttributeValues() argument
85 addMatchingProposals(proposals, choices.toArray(), offset, node, wordPrefix, in computeAttributeValues()
90 return super.computeAttributeValues(proposals, offset, parentTagName, attributeName, in computeAttributeValues()
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/
DBufferSubDataTransform.java36 public BufferSubDataTransform(IGLPropertyAccessor accessor, int offset, byte[] data) { in BufferSubDataTransform() argument
38 mOffset = offset; in BufferSubDataTransform()
/sdk/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/systrace/
DSystraceTask.java69 public void addOutput(byte[] data, int offset, int length) { in addOutput() argument
76 mBuffer[mDataLength + i] = data[offset + i]; in addOutput()
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/build/
DAaptQuickFixTest.java89 final int offset = getCaretOffset(file, caretLocation); in checkResourceFix() local
128 if (offset >= start && offset <= end) { in checkResourceFix()
156 return offset; in checkResourceFix()
212 final int offset = getCaretOffset(file, caretLocation); in checkNamespaceFix() local
256 return offset; in checkNamespaceFix()
/sdk/eclipse/plugins/com.android.ide.eclipse.ndk/src/com/android/ide/eclipse/ndk/internal/launch/
DGdbServerTask.java95 public synchronized void addOutput(byte[] data, int offset, int length) { in addOutput() argument
96 mOutput.append(new String(data, offset, length)); in addOutput()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/
DSetPropertyFix.java95 int offset = region.getStartOffset(); in apply() local
98 offset += attribute.length() + 2; in apply()
100 mSelect = new Region(offset, proposal.length()); in apply()
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/properties/
DValueCompleterTest.java40 private void checkCompletion(String text, int offset, in checkCompletion() argument
43 assertTrue(text.length() >= offset); in checkCompletion()
49 IContentProposal[] proposals = completer.getProposals(text, offset); in checkCompletion()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/
DAbsoluteLayoutRule.java167 Point offset = null; in onDropped()
188 offset = new Point(x - be.x, y - be.y); in onDropped()
190 } else if (offset != null && be.isValid()) { in onDropped()
191 x = offset.x + be.x; in onDropped()
192 y = offset.y + be.y; in onDropped()
/sdk/apps/SdkController/src/com/android/tools/sdkcontroller/lib/
DSocket.java115 public void send(byte[] data, int offset, int len) throws IOException { in send() argument
121 socket.getOutputStream().write(data, offset, len); in send()
/sdk/dumpeventlog/src/com/android/dumpeventlog/
DDumpEventLog.java50 public void newData(byte[] data, int offset, int length) { in newData() argument
52 mOutputStream.write(data, offset, length); in newData()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/
DRefactoringAssistant.java99 int offset = invocationContext.getOffset(); in computeQuickAssistProposals() local
114 IStructuredDocumentRegion region = doc.getRegionAtCharacterOffset(offset); in computeQuickAssistProposals()
115 ITextRegion subRegion = region.getRegionAtCharacterOffset(offset); in computeQuickAssistProposals()
125 resource = RenameResourceXmlTextAction.findResource(doc, offset); in computeQuickAssistProposals()
144 resource = RenameResourceXmlTextAction.findResource(doc, offset); in computeQuickAssistProposals()

123