Home
last modified time | relevance | path

Searched refs:element (Results 1 – 25 of 217) sorted by relevance

123456789

/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/
DAndroidJUnitPropertyTester.java58 IJavaElement element; in test() local
60 element = (IJavaElement) receiver; in test()
62 element = JavaCore.create((IResource) receiver); in test()
63 if (element == null) { in test()
67 element= (IJavaElement) ((IAdaptable) receiver).getAdapter(IJavaElement.class); in test()
68 if (element == null) { in test()
71 element = JavaCore.create(resource); in test()
72 if (element == null) { in test()
78 return isJUnitTest(element); in test()
80 return canLaunchAsJUnitTest(element); in test()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/ui/
DResourceLabelProvider.java65 public Image getImage(Object element) { in getImage() argument
74 public String getText(Object element) { in getText() argument
75 return getColumnText(element, 0); in getText()
89 public boolean isLabelProperty(Object element, String property) { in isLabelProperty() argument
99 public Image getColumnImage(Object element, int columnIndex) { in getColumnImage() argument
101 if (element instanceof ResourceItem) { in getColumnImage()
102 ResourceItem item = (ResourceItem)element; in getColumnImage()
112 public String getColumnText(Object element, int columnIndex) { in getColumnText() argument
115 if (element instanceof ResourceType) { in getColumnText()
116 return ((ResourceType)element).getDisplayName(); in getColumnText()
[all …]
/sdk/lint/libs/lint_checks/src/com/android/tools/lint/checks/
DSecurityDetector.java205 public void visitElement(@NonNull XmlContext context, @NonNull Element element) { in visitElement() argument
206 String tag = element.getTagName(); in visitElement()
208 checkService(context, element); in visitElement()
210 checkGrantPermission(context, element); in visitElement()
212 checkProvider(context, element); in visitElement()
214 checkActivity(context, element); in visitElement()
216 checkReceiver(context, element); in visitElement()
220 private boolean getExported(Element element) { in getExported() argument
222 String exportValue = element.getAttributeNS(ANDROID_URI, ATTR_EXPORTED); in getExported()
226 for (Element child : LintUtils.getChildren(element)) { in getExported()
[all …]
DManifestOrderDetector.java272 public void visitElement(@NonNull XmlContext context, @NonNull Element element) { in visitElement() argument
273 String tag = element.getTagName(); in visitElement()
274 Node parentNode = element.getParentNode(); in visitElement()
280 context.report(WRONG_PARENT, element, context.getLocation(element), in visitElement()
287 Attr nameNode = element.getAttributeNodeNS(ANDROID_URI, ATTR_NAME); in visitElement()
292 name = getPackage(element) + name; in visitElement()
294 name = getPackage(element) + '.' + name; in visitElement()
299 context.report(DUPLICATE_ACTIVITY, element, in visitElement()
311 if (parentNode != element.getOwnerDocument().getDocumentElement() in visitElement()
313 context.report(WRONG_PARENT, element, context.getLocation(element), in visitElement()
[all …]
DUselessViewDetector.java131 public void visitElement(@NonNull XmlContext context, @NonNull Element element) { in visitElement() argument
132 int childCount = LintUtils.getChildCount(element); in visitElement()
135 checkUselessLeaf(context, element); in visitElement()
138 checkUselessMiddleLayout(context, element); in visitElement()
143 private void checkUselessMiddleLayout(XmlContext context, Element element) { in checkUselessMiddleLayout() argument
152 Node parentNode = element.getParentNode(); in checkUselessMiddleLayout()
167 assert LintUtils.getChildCount(element) > 0; in checkUselessMiddleLayout()
181 boolean nodeHasBackground = element.hasAttributeNS(ANDROID_URI, ATTR_BACKGROUND); in checkUselessMiddleLayout()
195 boolean hasId = element.hasAttributeNS(ANDROID_URI, ATTR_ID); in checkUselessMiddleLayout()
196 Location location = context.getLocation(element); in checkUselessMiddleLayout()
[all …]
DButtonDetector.java217 public void visitElement(@NonNull XmlContext context, @NonNull Element element) { in visitElement() argument
229 String tagName = element.getTagName(); in visitElement()
231 NodeList childNodes = element.getChildNodes(); in visitElement()
245 String name = element.getAttribute(ATTR_NAME); in visitElement()
246 foundResource(context, name, element); in visitElement()
262 String name = element.getAttribute(ATTR_NAME); in visitElement()
263 foundResource(context, name, element); in visitElement()
278 String name = element.getAttribute(ATTR_NAME); in visitElement()
279 foundResource(context, name, element); in visitElement()
287 String text = element.getAttributeNS(ANDROID_URI, ATTR_TEXT); in visitElement()
[all …]
DNestedScrollingWidgetDetector.java92 Element element = (Element) node; in findOuterScrollingWidget() local
93 String tagName = element.getTagName(); in findOuterScrollingWidget()
95 && vertical == isVerticalScroll(element)) { in findOuterScrollingWidget()
96 return element; in findOuterScrollingWidget()
107 public void visitElement(@NonNull XmlContext context, @NonNull Element element) { in visitElement() argument
108 boolean vertical = isVerticalScroll(element); in visitElement()
116 Element parent = findOuterScrollingWidget(element.getParentNode(), vertical); in visitElement()
126 String msg = String.format(format, parent.getTagName(), element.getTagName()); in visitElement()
127 context.report(ISSUE, element, context.getLocation(element), msg, null); in visitElement()
133 public void visitElementAfter(@NonNull XmlContext context, @NonNull Element element) { in visitElementAfter() argument
[all …]
DChildCountDetector.java94 public void visitElement(@NonNull XmlContext context, @NonNull Element element) { in visitElement() argument
95 int childCount = LintUtils.getChildCount(element); in visitElement()
96 String tagName = element.getTagName(); in visitElement()
98 if (childCount > 1 && getAccurateChildCount(element) > 1) { in visitElement()
99 context.report(SCROLLVIEW_ISSUE, element, in visitElement()
100 context.getLocation(element), "A scroll view can have only one child", in visitElement()
105 if (childCount > 0 && getAccurateChildCount(element) > 0) { in visitElement()
106 context.report(ADAPTERVIEW_ISSUE, element, in visitElement()
107 context.getLocation(element), in visitElement()
114 private static int getAccurateChildCount(Element element) { in getAccurateChildCount() argument
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/tree/
DUiModelTreeLabelProvider.java44 public Image getImage(Object element) { in getImage() argument
48 if (element instanceof ElementDescriptor) { in getImage()
49 desc = (ElementDescriptor) element; in getImage()
50 } else if (element instanceof UiElementNode) { in getImage()
51 node = (UiElementNode) element; in getImage()
73 public String getText(Object element) { in getText() argument
74 if (element instanceof ElementDescriptor) { in getText()
75 ElementDescriptor desc = (ElementDescriptor) element; in getText()
77 } else if (element instanceof UiElementNode) { in getText()
78 UiElementNode node = (UiElementNode) element; in getText()
[all …]
/sdk/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/ui/
DPackagesPageImpl.java337 public String getText(Object element) { in getText() argument
340 if (element instanceof PkgCategory) { in getText()
341 return ((PkgCategory) element).getLabel(); in getText()
342 } else if (element instanceof PkgItem) { in getText()
343 return getPkgItemName((PkgItem) element); in getText()
344 } else if (element instanceof IDescription) { in getText()
345 return ((IDescription) element).getShortDescription(); in getText()
350 if (element instanceof PkgItem) { in getText()
351 api = ((PkgItem) element).getApi(); in getText()
358 if (element instanceof PkgItem) { in getText()
[all …]
/sdk/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/ui/
DPixelPerfectTree.java57 public Object[] getChildren(Object element) { in getChildren() argument
58 if (element instanceof ViewNode) { in getChildren()
59 List<ViewNode> children = ((ViewNode) element).children; in getChildren()
66 public Object getParent(Object element) { in getParent() argument
67 if (element instanceof ViewNode) { in getParent()
68 return ((ViewNode) element).parent; in getParent()
74 public boolean hasChildren(Object element) { in hasChildren() argument
75 if (element instanceof ViewNode) { in hasChildren()
76 return ((ViewNode) element).children.size() != 0; in hasChildren()
82 public Object[] getElements(Object element) { in getElements() argument
[all …]
DDeviceSelector.java82 public Object getParent(Object element) { in getParent() argument
83 if (element instanceof Window) { in getParent()
84 return ((Window) element).getDevice(); in getParent()
90 public boolean hasChildren(Object element) { in hasChildren() argument
91 if (element instanceof IDevice && mDoTreeViewStuff) { in hasChildren()
92 Window[] list = mModel.getWindows((IDevice) element); in hasChildren()
119 public Image getImage(Object element) { in getImage() argument
120 if (element instanceof IDevice) { in getImage()
121 if (((IDevice) element).isEmulator()) { in getImage()
130 public String getText(Object element) { in getText() argument
[all …]
DPropertyViewer.java81 public Object getParent(Object element) { in getParent() argument
83 if (mSelectedNode != null && element instanceof Property) { in getParent()
87 String name = ((Property) element).name; in getParent()
99 public boolean hasChildren(Object element) { in hasChildren() argument
101 if (mSelectedNode != null && element instanceof String) { in hasChildren()
102 String category = (String) element; in hasChildren()
109 if (name.startsWith(((String) element) + ":")) { in hasChildren()
146 public Image getColumnImage(Object element, int column) { in getColumnImage() argument
151 public String getColumnText(Object element, int column) { in getColumnText() argument
154 if (element instanceof String && column == 0) { in getColumnText()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/editors/
DStateLabelProvider.java54 private String getValue(IGLProperty element) { in getValue() argument
55 return element.getStringValue(); in getValue()
58 private String getName(IGLProperty element) { in getName() argument
59 IGLProperty parent = element.getParent(); in getName()
63 int index = ((GLListProperty) parent).indexOf(element); in getName()
64 if (element.getType() == GLStateType.GL_STATE_ES1) { in getName()
66 } else if (element.getType() == GLStateType.GL_STATE_ES2) { in getName()
74 int index = ((GLSparseArrayProperty) parent).keyFor(element); in getName()
78 return element.getType().getDescription(); in getName()
83 Object element = cell.getElement(); in update() local
[all …]
DStateContentProvider.java59 public Object getParent(Object element) { in getParent() argument
60 if (element instanceof IGLProperty) { in getParent()
61 return ((IGLProperty) element).getParent(); in getParent()
68 public boolean hasChildren(Object element) { in hasChildren() argument
69 if (element instanceof IGLProperty) { in hasChildren()
70 return ((IGLProperty) element).isComposite(); in hasChildren()
/sdk/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/
DFileLabelProvider.java69 public Image getImage(Object element) { in getImage() argument
77 public String getText(Object element) { in getText() argument
82 public Image getColumnImage(Object element, int columnIndex) { in getColumnImage() argument
84 if (element instanceof FileEntry) { in getColumnImage()
85 FileEntry entry = (FileEntry)element; in getColumnImage()
107 public String getColumnText(Object element, int columnIndex) { in getColumnText() argument
108 if (element instanceof FileEntry) { in getColumnText()
109 FileEntry entry = (FileEntry)element; in getColumnText()
148 public boolean isLabelProperty(Object element, String property) { in isLabelProperty() argument
/sdk/uiautomatorviewer/src/com/android/uiautomator/tree/
DBasicTreeNodeContentProvider.java49 public Object getParent(Object element) { in getParent() argument
50 if (element instanceof BasicTreeNode) { in getParent()
51 return ((BasicTreeNode)element).getParent(); in getParent()
57 public boolean hasChildren(Object element) { in hasChildren() argument
58 if (element instanceof BasicTreeNode) { in hasChildren()
59 return ((BasicTreeNode) element).hasChild(); in hasChildren()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/descriptors/
DAttributeDescriptorLabelProvider.java39 public Image getImage(Object element) { in getImage() argument
40 if (element instanceof UiAbstractTextAttributeNode) { in getImage()
41 UiAbstractTextAttributeNode node = (UiAbstractTextAttributeNode) element; in getImage()
55 public String getText(Object element) { in getText() argument
56 if (element instanceof UiAbstractTextAttributeNode) { in getText()
57 return ((UiAbstractTextAttributeNode)element).getCurrentValue(); in getText()
76 public boolean isLabelProperty(Object element, String property) { in isLabelProperty() argument
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/formatting/
DXmlPrettyPrinter.java648 Element element = (Element) node; in printOpenElementTag() local
649 if (newlineBeforeElementOpen(element, depth)) { in printOpenElementTag()
652 if (indentBeforeElementOpen(element, depth)) { in printOpenElementTag()
655 mOut.append('<').append(element.getTagName()); in printOpenElementTag()
657 NamedNodeMap attributes = element.getAttributes(); in printOpenElementTag()
705 boolean isClosed = isEmptyTag(element); in printOpenElementTag()
711 && !TAG_ITEM.equals(element.getTagName()) in printOpenElementTag()
712 && (isClosed || element.getAttributes().getLength() > 0)) { in printOpenElementTag()
722 if (newlineAfterElementOpen(element, depth, isClosed)) { in printOpenElementTag()
728 Element element = (Element) node; in printCloseElementTag() local
[all …]
/sdk/traceview/src/com/android/traceview/
DProfileProvider.java166 public Object[] getChildren(Object element) { in getChildren() argument
167 if (element instanceof MethodData) { in getChildren()
168 MethodData md = (MethodData) element; in getChildren()
171 if (element instanceof ProfileNode) { in getChildren()
172 ProfileNode pn = (ProfileNode) element; in getChildren()
179 public Object getParent(Object element) { in getParent() argument
184 public boolean hasChildren(Object element) { in hasChildren() argument
185 if (element instanceof MethodData) in hasChildren()
187 if (element instanceof ProfileNode) in hasChildren()
193 public Object[] getElements(Object element) { in getElements() argument
[all …]
/sdk/anttasks/src/com/android/ant/
DComputeDependencyTask.java147 PathElement element = manifestFilePath.createPathElement(); in execute()
148 element.setPath(libRootPath + '/' + SdkConstants.FN_ANDROID_MANIFEST_XML); in execute()
152 element = resFolderPath.createPathElement(); in execute()
153 element.setPath(libRootPath + '/' + SdkConstants.FD_OUTPUT + in execute()
155 element = resFolderPath.createPathElement(); in execute()
156 element.setPath(libRootPath + '/' + SdkConstants.FD_RESOURCES); in execute()
160 element = nativeFolderPath.createPathElement(); in execute()
161 element.setPath(libRootPath + '/' + SdkConstants.FD_NATIVE_LIBS); in execute()
165 element = binAidlFolderPath.createPathElement(); in execute()
166 element.setPath(libRootPath + '/' + SdkConstants.FD_OUTPUT + in execute()
[all …]
/sdk/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/
DWayPointLabelProvider.java30 public Image getColumnImage(Object element, int columnIndex) { in getColumnImage() argument
35 public String getColumnText(Object element, int columnIndex) { in getColumnText() argument
36 if (element instanceof WayPoint) { in getColumnText()
37 WayPoint wayPoint = (WayPoint)element; in getColumnText()
70 public boolean isLabelProperty(Object element, String property) { in isLabelProperty() argument
DTrackLabelProvider.java34 public Image getColumnImage(Object element, int columnIndex) { in getColumnImage() argument
39 public String getColumnText(Object element, int columnIndex) { in getColumnText() argument
40 if (element instanceof Track) { in getColumnText()
41 Track track = (Track)element; in getColumnText()
78 public boolean isLabelProperty(Object element, String property) { in isLabelProperty() argument
/sdk/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/
DNativeStackLabelProvider.java32 public String getColumnText(Object element, int index) { in getColumnText() argument
33 if (element instanceof NativeStackCallInfo) { in getColumnText()
34 return getResolvedStackTraceColumnText((NativeStackCallInfo) element, index); in getColumnText()
37 if (element instanceof Long) { in getColumnText()
40 return getStackAddressColumnText((Long) element, index); in getColumnText()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/
DOutlineLabelProvider.java42 public Image getImage(Object element) { in getImage() argument
43 if (element instanceof Element) { in getImage()
44 Element e = (Element) element; in getImage()
52 return super.getImage(element); in getImage()
56 public String getText(Object element) { in getText() argument
57 String text = super.getText(element); in getText()
58 if (element instanceof Element) { in getText()
59 Element e = (Element) element; in getText()

123456789