Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Sep 28, 2024
1 parent b6f0374 commit 7890d9d
Show file tree
Hide file tree
Showing 5 changed files with 464 additions and 436 deletions.
43 changes: 23 additions & 20 deletions plugins/com.python.pydev.refactoring/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<extension point="org.python.pydev.pydev_pyedit_listener">
<pyedit_listener_participant class="com.python.pydev.refactoring.markoccurrences.MarkOccurrencesDispatcher"/>
</extension>

<!-- Initialize our preferences -->
<extension
point="org.eclipse.core.runtime.preferences">
Expand Down Expand Up @@ -43,15 +43,18 @@

<!-- Generate code (tdd) -->
<extension point="org.python.pydev.pydev_ctrl_1">
<ctrl_1_participant class="com.python.pydev.refactoring.tdd.TddCodeGenerationQuickFixParticipant"/>
<ctrl_1_participant class="com.python.pydev.refactoring.tdd.TddCodeGenerationQuickFixFromMarkersParticipant"/>
</extension>
<extension point="org.python.pydev.pydev_ctrl_1">
<ctrl_1_participant class="com.python.pydev.refactoring.tdd.TddCodeGenerationQuickFixWithoutMarkersParticipant"/>
</extension>


<!-- Create the needed actions -->
<extension point="org.python.pydev.pydev_pyedit_listener">
<pyedit_listener_participant class="com.python.pydev.refactoring.actions.ActionCreatorPyEditListener"/>
</extension>

<!--[[[cog
#Note: run the install.py to regenerate the actions contents!
#Actions below available only to PyDev editors (generating code for new actions now).
Expand Down Expand Up @@ -121,14 +124,14 @@
</extension>

<!--[[[end]]]-->


<extension point="org.eclipse.ui.bindings">
<!-- command: Find all references-->
<key
sequence="M1+M2+G"
contextId="org.python.pydev.ui.editor.scope"
commandId="com.python.pydev.refactoring.actions.PyFindAllOccurrences"
commandId="com.python.pydev.refactoring.actions.PyFindAllOccurrences"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
</key>
<!-- command: Go To Defition-->
Expand Down Expand Up @@ -202,19 +205,19 @@
</key>
-->

<!--[[[cog
import plugin_install
import cog
template = '''
<key
commandId="%s"
sequence="%s"
contextId="org.python.pydev.ui.editor.scope"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
'''
for action in plugin_install.ACTIONS_AND_BINDING:
for key in action.key:
cog.outl(template % (action.id, key))
Expand All @@ -234,7 +237,7 @@
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>

<!--[[[end]]]-->

</extension>

<extension
Expand Down Expand Up @@ -283,19 +286,19 @@
description="%peptic.OverrideMethodsDescription"
id="org.python.pydev.refactoring.ui.actions.OverrideMethodsCommand"
name="%peptic.OverrideMethodsLabel"/>

<!--[[[cog
import plugin_install
import cog
template = '''
<command
categoryId="org.python.pydev.refactoring.pepticCategory"
description="%%peptic.%sDescription"
id="%s"
name="%%peptic.%sLabel"/>
'''
for action in plugin_install.ACTIONS_AND_BINDING:
cog.outl(template % (action.desc, action.id, action.desc))
]]]-->
Expand Down Expand Up @@ -392,7 +395,7 @@
<!--[[[cog
import plugin_install
import cog
template = '''
<action
class="%s"
Expand All @@ -402,7 +405,7 @@
menubarPath="org.python.pydev.refactoring.refactoringMenu/%s"
style="push"/>
'''
for action in plugin_install.ACTIONS_AND_BINDING:
cog.outl(template % (action.class_, action.id, action.id, action.desc, action.group))
]]]-->
Expand Down Expand Up @@ -430,8 +433,8 @@
label="%peptic.InlineLocalLabel"
menubarPath="org.python.pydev.refactoring.refactoringMenu/pepticRefactoringGroup"
style="push"/>


<action
class="com.python.pydev.refactoring.actions.PyFindAllOccurrences"
definitionId="com.python.pydev.refactoring.actions.PyFindAllOccurrences"
Expand Down Expand Up @@ -499,7 +502,7 @@
<!--[[[cog
import plugin_install
import cog
template = '''
<action
class="%s"
Expand All @@ -509,7 +512,7 @@
menubarPath="org.python.pydev.editor.refactoring/%s">
</action>
'''
for action in plugin_install.ACTIONS_AND_BINDING:
cog.outl(template % (action.class_, action.id, action.id, action.desc, action.group))
]]]-->
Expand Down Expand Up @@ -538,7 +541,7 @@
label="%peptic.InlineLocalLabel"
menubarPath="org.python.pydev.editor.refactoring/pepticRefactoringGroup">
</action>

</viewerContribution>
</extension>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.python.pydev.refactoring.tdd;

import com.python.pydev.analysis.additionalinfo.builders.AnalysisRunner;
import com.python.pydev.analysis.ctrl_1.AbstractAnalysisMarkersParticipants;

public class TddCodeGenerationQuickFixFromMarkersParticipant extends AbstractAnalysisMarkersParticipants {

private TddQuickFixParticipant tddQuickFixParticipant;

@Override
protected void fillParticipants() {
tddQuickFixParticipant = new TddQuickFixParticipant();
participants.add(tddQuickFixParticipant);
}

@Override
protected String getMarkerType() {
return AnalysisRunner.PYDEV_ANALYSIS_PROBLEM_MARKER;
}

}
Loading

0 comments on commit 7890d9d

Please sign in to comment.