In Nautilus class definition pane, if it shows a class definition like you can select an inst var and Object subclass: #RBNamespace instanceVariableNames: 'changes environment newClasses removedClasses changedClasses rootClasses implementorsCache sendersCache' classVariableNames: '' package: 'Refactoring-Core-Model' The problem, Rubric needs to know the current selected class (it calls classOrMetaclass on the *interaction model* (Nautilus) to find the class it searches for this inst var. But the same method #classOrMetaclass is called by NEC, and if NEC finds a class it trys to parse the current text as a method definition, but this panes contains a class definition, not a method definition, and this yields to the strange completions (case 16712) this is what I tried to fix when I broke this browseAllAccessesTo behavior. Any Idea how we can get both ? - Rubric to find the correct class for browsing inst var access - NEC to find *no class* so it does not try to complete the inst var names. I don't know how to solve this, I don't understand how rubric delegates this calls (it should be possible to call #selectedBehavior or #selectedClass but it uses some delegates rub editing -> rub editor -> rub scrolled text model -> interaction model -> nautilus ui |
For the Rubric keybinding; changing the calls using “self model” in RubSmalltalkEditor>>#modelCurrentSelectedClass to call “self model
interactionModel” instead should make the keybinding work again (at least changing the one to #selectedBehaviour). Best regards, Henrik
From: Pharo-dev [mailto:[hidden email]]
On Behalf Of Nicolai Hess In Nautilus class definition pane, if it shows a class definition like you can select an inst var and use cmd+shift+n to browse all accesses to this var. I broke this behavior. ( But I find it useful and a I want it back). The problem, Rubric needs to know the current selected class (it calls classOrMetaclass on the *interaction model* (Nautilus) to find the class it searches for this inst var. But the same method #classOrMetaclass is called by NEC, and if NEC finds a class it trys to parse the current text as a method definition, but this panes contains a class definition, not a method definition, and this yields to the strange completions (case 16712) this is what I tried to fix when I broke this browseAllAccessesTo behavior. Any Idea how we can get both ? - Rubric to find the correct class for browsing inst var access - NEC to find *no class* so it does not try to complete the inst var names. I don't know how to solve this, I don't understand how rubric delegates this calls (it should be possible to call #selectedBehavior or #selectedClass but it uses some delegates rub editing -> rub editor -> rub scrolled text model -> interaction model -> nautilus ui |
2015-11-30 0:07 GMT+01:00 Henrik Nergaard <[hidden email]>:
Yes! But I must admit that I don't understand the purpose of the interactionModel, why does the text model has an interaction model ? Do all text model provide it ?
|
If I remember the interaction model captures the following:
Rubric a model for the text but this is not the one of the interaction. For example if you want to be able to cancel your edit you should edit the rubric model but the interaction model. Then the interaction model is turned into a rubric model on okToSave Stef Le 30/11/15 00:28, Nicolai Hess a
écrit :
|
Free forum by Nabble | Edit this page |