Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [imp-dev] double click strategy as a service

Hi Jurgen,

You're right that it's not a service, but given recent changes, you can extend the class StructuredSourceViewerConfiguration, override getDoubleClickStrategy() and return any implementation of ITextDoubleClickStrategy you want.

The default implementation looks like this:

    public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
        return new DoubleClickStrategy(getLanguageServiceManager().getParseController());
    }

so you can see that it's easy to get to the IParseController, and hence to the AST.

Does this do what you need, or do you think we should really wrap this as a separate service?

I confess I'm a bit on the fence these days about wrapping everything as a service/extension point...

On Oct 20, 2010, at 7:05 AM, Jurgen Vinju wrote:

Hi guys,

I'd like to have the double click strategy also as a service. The
current implementation uses lexical features from
ILanguageSyntaxProperties, but what if I can use the AST to get this
information more quickly and more precisely?
Thoughts?

Cheers,

Jurgen

--
Cheers,
  -- Bob
--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IMP Team Lead (http://www.eclipse.org/imp)
X10: Productivity for High-Performance Parallel Programming (http://x10-lang.org)


Back to the top