Examples of ItemPointer


Examples of org.dcm4che3.data.ItemPointer

            "DicomAttribute[@tag=\"00400275\"]/Item[@number=\"1\"]/"
          + "DicomAttribute[@tag=\"0020000D\"]/Value[@number=\"1\"]";

    @Test
    public void testToString() {
        ItemPointer ip = new ItemPointer(Tag.RequestAttributesSequence);
        ValueSelector vs = new ValueSelector(Tag.StudyInstanceUID, null, null, 0, ip);
        assertEquals(XPATH, vs.toString());
    }
View Full Code Here

Examples of org.dcm4che3.data.ItemPointer

        assertEquals(Tag.StudyInstanceUID, vs.tag);
        assertNull(vs.privateCreator);
        assertNull(vs.vr);
        assertEquals(0, vs.valueIndex);
        assertEquals(1, vs.itemPointers.length);
        ItemPointer ip = vs.itemPointers[0];
        assertEquals(Tag.RequestAttributesSequence, ip.sequenceTag);
        assertNull(ip.privateCreator);
        assertEquals(0, ip.itemIndex);
    }
View Full Code Here

Examples of org.dcm4che3.data.ItemPointer

    public boolean isBulkDataFragment(Fragments frags) {
        if (tag != Tag.Item)
            return false;
       
        int last = itemPointers.size() - 1;
        ItemPointer ip = itemPointers.get(last);
        return bulkDataDescriptor.isBulkData(itemPointers.subList(0, last),
                ip.privateCreator, ip.sequenceTag, frags.vr(), length);
    }
View Full Code Here

Examples of org.dcm4che3.data.ItemPointer

    }

    private void addItemPointer(int sqtag, String privateCreator, int itemIndex) {
        if (itemPointers == null)
            itemPointers = new ArrayList<ItemPointer>(8);
        itemPointers.add(new ItemPointer(sqtag, privateCreator, itemIndex));
    }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

    public void open() {
        File file = new File(this.location);
        if (file.exists()) {
            PyOpenAction openAction = new PyOpenAction();
            String fileContents = FileUtils.getFileContents(file);
            ItemPointer itemPointer = getItemPointer(file, fileContents, this.test);
            openAction.run(itemPointer);
        }
    }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

            if (testPath != null && testPath.length() > 0) {
                testNode = NodeUtils.getNodeFromPath(node, testPath);
            }
        }

        ItemPointer itemPointer;
        if (testNode != null) {
            itemPointer = new ItemPointer(file, testNode);
        } else {
            //Ok, it's not defined directly here (it's probably in a superclass), so, let's go on and
            //do an actual (more costly) find definition.
            try {
                PySourceLocatorBase locator = new PySourceLocatorBase();
                IFile workspaceFile = locator.getWorkspaceFile(file);
                if (workspaceFile != null && workspaceFile.exists()) {
                    IProject project = workspaceFile.getProject();
                    if (project != null && project.exists()) {
                        PythonNature nature = PythonNature.getPythonNature(project);
                        String moduleName = nature.resolveModule(file);
                        if (moduleName != null) {
                            IModule mod = nature.getAstManager().getModule(moduleName, nature, true);
                            if (mod != null) {
                                ICompletionCache completionCache = new CompletionCache();
                                IDefinition[] definitions = mod.findDefinition(CompletionStateFactory
                                        .getEmptyCompletionState(testPath, nature, completionCache), -1, -1, nature);

                                if (definitions != null && definitions.length > 0) {
                                    List<ItemPointer> pointers = new ArrayList<ItemPointer>();
                                    PyRefactoringFindDefinition.getAsPointers(pointers, (Definition[]) definitions);
                                    if (pointers.size() > 0) {
                                        return pointers.get(0);
                                    }
                                }
                            }
                        }
                    }
                }
            } catch (Exception e) {
                Log.log(e);
            }
            //if we couldn't actually get the definition line, at least open the file we had (although that may not really
            //be the place where it's defined if it's a test in a superclass).
            itemPointer = new ItemPointer(file);
        }
        return itemPointer;
    }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

                    temp.append("</pydev_hint_bold>");
                    temp.append(PyInformationPresenter.LINE_DELIM);
                }

                if (def.module != null && def.value != null) {
                    ItemPointer pointer = PyRefactoringFindDefinition.createItemPointer(def);
                    String asPortableString = pointer.asPortableString();
                    if (asPortableString != null) {
                        //may happen if file is not in the pythonpath
                        temp.replaceAll(
                                "<pydev_hint_bold>",
                                com.aptana.shared_core.string.StringUtils.format("<pydev_link pointer=\"%s\">",
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

                link = new FileLink(files[0], null, -1, -1, num);
            else {
                // files outside of the workspace
                File realFile = new File(fileName);
                if (!onlyCreateLinksForExistingFiles || realFile.exists()) {
                    ItemPointer p = new ItemPointer(realFile, new Location(num - 1, 0), null);
                    link = new ConsoleLink(p);
                }
            }
            if (link != null) {
                linkContainer.addLink(link, lineOffset + fileStart, lineLength - fileStart);
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

    @Override
    protected void openFiles(PythonpathTreeNode[] pythonPathFilesSelected) {
        for (PythonpathTreeNode n : pythonPathFilesSelected) {
            try {
                if (PythonPathHelper.isValidSourceFile(n.file.getName())) {
                    new PyOpenAction().run(new ItemPointer(n.file));
                } else {
                    IEditorRegistry editorReg = PlatformUI.getWorkbench().getEditorRegistry();
                    IEditorDescriptor defaultEditor = editorReg.getDefaultEditor(n.file.getName());
                    if (defaultEditor != null) {
                        IDE.openEditor(page, PydevFileEditorInput.create(n.file, false), defaultEditor.getId());
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

    @Override
    protected void openFiles(PythonpathZipChildTreeNode[] pythonPathFilesSelected) {
        for (PythonpathZipChildTreeNode n : pythonPathFilesSelected) {
            try {
                if (PythonPathHelper.isValidSourceFile(n.zipPath)) {
                    new PyOpenAction().run(new ItemPointer(n.zipStructure.file, new Location(), new Location(), null,
                            n.zipPath));
                } else {
                    IEditorRegistry editorReg = PlatformUI.getWorkbench().getEditorRegistry();
                    IEditorDescriptor defaultEditor = editorReg.getDefaultEditor(n.zipPath);
                    PydevZipFileStorage storage = new PydevZipFileStorage(n.zipStructure.file, n.zipPath);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.