| Summary: | No selection at all anymore using default implementation of DoubleClickStrategy | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Jurgen Vinju <jurgen.vinju> |
| Component: | IMP | Assignee: | Robert M. Fuhrer <rfuhrer> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
If I'm not mistaken, you're also getting an NPE in DoubleClickStrategy, because null was not a valid return value for ILanguageSyntaxProperties.getDoubleClickRegion(). I've changed DoubleClickStrategy.findExtendedDoubleClickSelection() so that it does something more sensible when getDoubleClickRegion() returns null. The fix has been committed to SVN trunk, and will be part of the next release. Please test and let me know whether this fixes your problem. It works for me! thanks. |
I have the following implementation of LanguageSyntaxProperties, but double clicking has no effect anymore on the selection in my editor. This is just after updating my checkout of IMP to a version that has the new DoubleClick feature. package org.rascalmpl.eclipse.editor; import org.eclipse.imp.parser.IParseController; import org.eclipse.imp.services.ILanguageSyntaxProperties; import org.eclipse.jface.text.IRegion; public class RascalSyntaxProperties implements ILanguageSyntaxProperties { public String getBlockCommentContinuation() { return " * "; } public String getBlockCommentEnd() { return "*/"; } public String getBlockCommentStart() { return "/*"; } public String[][] getFences() { return new String[][] { new String[] { "(", ")" }, new String[] { "{", "}" }, new String[] { "<", ">" }, new String[] { "[", "]" } }; } public int[] getIdentifierComponents(String ident) { return new int[0]; } public String getIdentifierConstituentChars() { return null; } public String getSingleLineCommentPrefix() { return "//"; } public IRegion getDoubleClickRegion(int offset, IParseController pc) { return null; } public boolean isIdentifierPart(char ch) { return Character.isJavaIdentifierPart(ch); } public boolean isIdentifierStart(char ch) { return Character.isJavaIdentifierStart(ch); } public boolean isWhitespace(char ch) { return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'; } }