Examples of FindResult


Examples of com.intellij.find.FindResult

                        DataModelCell cell = (DataModelCell) c;
                        String userValue = cell.getFormattedUserValue();
                        if (userValue != null) {
                            int findOffset = 0;
                            while (true) {
                                FindResult findResult = findManager.findString(userValue, findOffset, findModel);
                                searchResult.checkTimestamp(updateTimestamp);
                                if (findResult.isStringFound()) {
                                    searchResult.addMatch(cell, findResult.getStartOffset(), findResult.getEndOffset());
                                    findOffset = findResult.getEndOffset();
                                } else {
                                    break;
                                }
                            }
                        }
View Full Code Here

Examples of com.intellij.find.FindResult

            List<Integer> offsets = new ArrayList<Integer>();
            while (offset < endOffset) {
//                System.out.println("offset: " + offset + "/" + endOffset);

//                System.out.println("Finding: " + findModel.getStringToFind() + " = " + offset);
                FindResult result = findManager.findString(text, offset, findModel, virtualFile);
                if (!result.isStringFound()) {
//                    System.out.println(findModel.getStringToFind() + ": not found");
                    break;
                }

//                System.out.println("result: " + result.toString());

                UsageInfo2UsageAdapter usageAdapter = new UsageInfo2UsageAdapter(new UsageInfo(psiFile, result.getStartOffset(), result.getEndOffset()));
                Point point = editor.logicalPositionToXY(editor.offsetToLogicalPosition(usageAdapter.getUsageInfo().getNavigationOffset()));
                if (visibleArea.contains(point)) {
                    UsageInfo usageInfo = usageAdapter.getUsageInfo();
                    int navigationOffset = usageInfo.getNavigationOffset();
                    if (navigationOffset != caretModel.getOffset()) {
                        if (!results.contains(navigationOffset)) {
//                            System.out.println("Adding: " + navigationOffset + "-> " + usageAdapter.getPlainText());
                            offsets.add(navigationOffset);
                        }
                    }
                }


                final int prevOffset = offset;
                offset = result.getEndOffset();


                if (prevOffset == offset) {
                    ++offset;
                }
View Full Code Here

Examples of org.gjt.jclasslib.browser.config.classpath.FindResult

        return getParentFrame().getActionForward();
    }

    public void openClassFile(String className, BrowserPath browserPath) {

        FindResult findResult = getParentFrame().getConfig().findClass(className);
        while (findResult == null) {
            int result = GUIHelper.showOptionDialog(getParentFrame(),
                    "The class " + className + " could not be found.\n" +
                    "You can check your classpath configuration and try again.",
                    new String[]{"Setup classpath", "Cancel"},
                    JOptionPane.WARNING_MESSAGE);
            if (result == 0) {
                getParentFrame().getActionSetupClasspath().actionPerformed(new ActionEvent(this, 0, null));
                findResult = getParentFrame().getConfig().findClass(className);
            } else {
                return;
            }
        }

        BrowserInternalFrame frame = (BrowserInternalFrame)desktopManager.getOpenFrame(new WindowState(findResult.getFileName()));
        if (frame != null) {
            try {
                frame.setSelected(true);
                frame.browserComponent.setBrowserPath(browserPath);
                desktopManager.scrollToVisible(frame);
            } catch (PropertyVetoException e) {
            }
        } else {
            WindowState windowState = new WindowState(findResult.getFileName(), browserPath);
            frame = new BrowserInternalFrame(desktopManager, windowState);
            if (isMaximum()) {
                try {
                    frame.setMaximum(true);
                } catch (PropertyVetoException ex) {
View Full Code Here

Examples of org.gjt.jclasslib.browser.config.classpath.FindResult

        String selectedClassName = classpathBrowser.getSelectedClassName();
        if (selectedClassName == null) {
            return;
        }

        FindResult findResult = config.findClass(selectedClassName);
        if (findResult == null) {
            GUIHelper.showMessage(this, "Error loading " + selectedClassName, JOptionPane.ERROR_MESSAGE);
            return;
        }

        repaintNow();
        setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        try {
            BrowserInternalFrame frame = new BrowserInternalFrame(desktopManager, new WindowState(findResult.getFileName()));
            try {
                frame.setMaximum(true);
            } catch (PropertyVetoException ex) {
            }
        } catch (IOException e) {
View Full Code Here

Examples of org.gjt.jclasslib.browser.config.classpath.FindResult

        return getParentFrame().getActionForward();
    }

    public void openClassFile(String className, BrowserPath browserPath) {

        FindResult findResult = getParentFrame().getConfig().findClass(className);
        while (findResult == null) {
            int result = GUIHelper.showOptionDialog(getParentFrame(),
                    "The class " + className + " could not be found.\n" +
                    "You can check your classpath configuration and try again.",
                    new String[]{"Setup classpath", "Cancel"},
                    JOptionPane.WARNING_MESSAGE);
            if (result == 0) {
                getParentFrame().getActionSetupClasspath().actionPerformed(new ActionEvent(this, 0, null));
                findResult = getParentFrame().getConfig().findClass(className);
            } else {
                return;
            }
        }

        BrowserInternalFrame frame = (BrowserInternalFrame)desktopManager.getOpenFrame(new WindowState(findResult.getFileName()));
        if (frame != null) {
            try {
                frame.setSelected(true);
                frame.browserComponent.setBrowserPath(browserPath);
                desktopManager.scrollToVisible(frame);
            } catch (PropertyVetoException e) {
            }
        } else {
            WindowState windowState = new WindowState(findResult.getFileName(), browserPath);
            try {
                frame = new BrowserInternalFrame(desktopManager, windowState);
                if (isMaximum()) {
                    try {
                        frame.setMaximum(true);
View Full Code Here

Examples of org.pdtextensions.repos.FindResult

      }
      for (final IModuleVersion v : result.moduleVersions()) {
        versions.add(v);
      }
    }
    return new FindResult(Status.OK_STATUS, versions);
  }
View Full Code Here

Examples of org.pdtextensions.repos.FindResult

          result.add(v2);
        }
      }
    } catch (CoreException e) {
      result.clear();
      return new FindResult(new Status(IStatus.ERROR, PEXReposPlugin.PLUGIN_ID, "Failed searching for vendors", e), result);
    }
   
    return new FindResult(Status.OK_STATUS, result);
  }
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.