Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-ui-dev] Extending Find references/declarations for other languages/files

Hi,

I'm trying to get my head around how adopters is supposed to enhance Find references/declarations in Eclipse to make matches available in context of other languagues (e.g. like Seam)

I see that there is a global command (e.g. org.eclipse.jdt.ui.edit.text.java.search.references.in.workspace) which is available from all editors.

I can see how we can use IQueryParticipant to extend the search done from within Java on IJavaElements, but how (if at all possible) should we enable search for strings and other files (like .xhtml) where the Ctrl+Shift+G is also bound but have no handler.

Am i missing some obvious extension point or is this not possible and we will have to find other ways to provide this extended Find refernces search ? (e.g. put it in Ctrl+1/quick-fix menu since there aren't really any keycombinations left :)

Example:

  public boolean authenticate() {
     log.info("authenticating #{user.name}");
     return true;
  }
     
Here Find Refernces works fine if the cursor is on top of the authenticate() method declaration.
but if I put it over user.name it fails with an error message because it does not match a java element, but for e.g. seam an EL expression like #{user.name} *is* resolvable.

The other issue is within other files, e.g. xhtml where you also can have EL expressions and here find references short cut is also taken, but I guess here the intention is that we just redirect it to our handler for the specific editors we support.

Hope I make sense :) Basically just trying to figure out if this is worth a bug report/feature enhancement or I missed something.
     
/max


Back to the top