@Test public void testNavigate_method() { handler.async(); getComponent(EditSourceUtil.class)._setNavigator(new EditSourceUtil.Navigator() { @Override public void navigate(final NavigationItem item, final boolean requestFocus, final boolean useCurrentWindow) { handler.done(new Runnable() { @Override public void run() { Assert.assertEquals("PsiMethod:one", item.toString()); Assert.assertTrue(requestFocus); Assert.assertTrue(useCurrentWindow); } }); } }); createTestClazz(); boolean result = new ReadAction<Boolean>() { @Override protected void run(Result<Boolean> result) throws Throwable { String hyperlink = new ClassCandidate(1, 100, 10, 90, "test.Clazz", "Clazz", 0, "one").createLink(getProject()); result.setResult(new MyRecognizer().navigate(getProject(), hyperlink)); } }.execute().getResultObject(); Assert.assertTrue(result); }
public boolean navigate(Project project, String hyperlink) { if(hyperlink.startsWith("goto:")) { openEditor(project, hyperlink.substring(5)); return true; } else { return false; } }
ClassRecognizer implements Recognizer { public boolean navigate(Project project, String hyperlink) { if(hyperlink.startsWith("goto:")) { openEditor(project, hyperlink.substring(5)); return true; } else { return false; } } }
ClassRecognizer implements Recognizer { public boolean navigate(Project project, String hyperlink) { if(hyperlink.startsWith("goto:")) { openEditor(project, hyperlink.substring(5)); return true; } else { return false; } }  }
ClassRecognizer implements Recognizer { public boolean navigate(Project project, String hyperlink) { if(hyperlink.startsWith("goto:")) { openEditor(project, hyperlink.substring(5)); return true; } else { return false; } }  boolean navigate(Project project, String hyperlink); }
ClassRecognizer implements Recognizer { public boolean navigate(Project project, String hyperlink) { if(hyperlink.startsWith("goto:")) { openEditor(project, hyperlink.substring(5)); return true; } else { return false; } }  boolean navigate(Project project, String hyperlink);  }