-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] First stab at Move Function
- Loading branch information
Showing
12 changed files
with
82 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
include ../Makefile.boilerplate | ||
|
||
CXREF = ../../src/c-xref | ||
ARGUMENTS = -xrefactory-II -refactory -xrefrc $(CURDIR)/.c-xrefrc -p $(CURDIR) -rfct-move-static-method -movetargetfile=$(CURDIR)/source/target.c -rfct-param1=3 -olmark=33 -olcursor=33 $(CURDIR)/source/source.c | ||
|
||
$(TEST): .c-xrefrc | ||
-rm -rf CXrefs | ||
../../src/c-xref -p $(CURDIR) -xrefrc .c-xrefrc -sourcepath sources -create source > CXrefs.output | ||
$(CXREF) $(ARGUMENTS) > output.tmp | ||
$(NORMALIZE) output.tmp > output | ||
$(VERIFY) | ||
$(TEST): | ||
@-$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) > output.tmp | ||
@$(NORMALIZE) output.tmp > output | ||
@diff output expected > /dev/null ; \ | ||
if [ $$? -ne 0 ] ; then \ | ||
$(FAIL) ; \ | ||
echo "diff output expected" ; \ | ||
diff output expected ; \ | ||
exit 1 ; \ | ||
else \ | ||
$(OK) ; \ | ||
exit 0 ; \ | ||
fi | ||
|
||
trace: EXTRA = \'-trace\' | ||
trace: $(TEST) | ||
|
||
clean: | ||
@-rm -rf .c-xrefrc CXrefs output.tmp output log | ||
rm -rf .c-xrefrc CXrefs output.log output.tmp | ||
|
||
DEBUGGER = gdb | ||
gdb debug: | ||
$(DEBUGGER) --args $(CXREF) $(ARGUMENTS) | ||
debug gdb: | ||
@$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & | ||
sleep 1 | ||
sudo gdb -pid `pgrep -a c-xref | grep -v emacs | awk '{ print $$1 }'` -ex 'br setAvailableRefactorings' -ex 'continue' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,34 @@ | ||
<update-report> | ||
</update-report> | ||
<update-report> | ||
<information len=<n>>Prescanning classes, please wait.</information> | ||
<information len=<n>>C-xrefactory project: CURDIR</information> | ||
<information len=<n>>CURDIR/source/source.c</information> | ||
<information len=<n>>CURDIR/source/target.c</information> | ||
<information len=<n>>Generating 'CURDIR/CXrefs'</information> | ||
</update-report> | ||
<goto> | ||
<position-off off=33 len=<n>>CURDIR/source/source.c</position-off> | ||
</goto> | ||
<cut-block val=39 len=<n>></cut-block> | ||
<goto> | ||
<position-off off=32 len=<n>>CURDIR/source/target.c</position-off> | ||
</goto> | ||
<paste-block len=<n>></paste-block> | ||
<goto> | ||
<position-off off=36 len=<n>>CURDIR/source/target.c</position-off> | ||
</goto> | ||
<replacement> | ||
<str len=<n>>private </str> <str len=<n>></str> | ||
</replacement> | ||
<goto> | ||
<position-off off=36 len=<n>>CURDIR/source/target.c</position-off> | ||
</goto> | ||
<replacement> | ||
<str len=<n>></str> <str len=<n>>public </str> | ||
</replacement> | ||
<goto> | ||
<position-off off=36 len=<n>>CURDIR/source/target.c</position-off> | ||
</goto> | ||
<replacement> | ||
<str len=<n>>public </str> <str len=<n>></str> | ||
</replacement> | ||
<goto> | ||
<position-off off=36 len=<n>>CURDIR/source/target.c</position-off> | ||
</goto> | ||
<replacement> | ||
<str len=<n>></str> <str len=<n>>private </str> | ||
</replacement> | ||
<goto> | ||
<position-off off=58 len=<n>>CURDIR/source/target.c</position-off> | ||
</goto> | ||
<indent-block val=2 len=<n>></indent-block> | ||
../../src/c-xref "-xrefactory-II" "-crlfconversion" "-crconversion" "-encoding=default" "-server" -o server-buffer | ||
-olcxgetprojectname -xrefrc "/home/thoni/Utveckling/c-xrefactory/tests/sandboxed_emacs/.c-xrefrc" "CURDIR/source/target.c" | ||
end-of-options | ||
|
||
<sync> | ||
<set-info len=<n>>CURDIR</set-info> | ||
-olcxgetrefactorings "-olcursor=19" "CURDIR/source/target.c" -encoding=european -xrefrc "/home/thoni/Utveckling/c-xrefactory/tests/sandboxed_emacs/.c-xrefrc" -p "CURDIR" | ||
end-of-options | ||
|
||
<sync> | ||
<available-refactorings> | ||
<int val=290 len=<n>></int> | ||
<int val=300 len=<n>></int> | ||
</available-refactorings> | ||
-olcxgetprojectname -xrefrc "/home/thoni/Utveckling/c-xrefactory/tests/sandboxed_emacs/.c-xrefrc" "CURDIR/source/source.c" | ||
end-of-options | ||
|
||
<sync> | ||
<set-info len=<n>>CURDIR</set-info> | ||
-olcxgetrefactorings "-olcursor=32" "CURDIR/source/source.c" -encoding=european -xrefrc "/home/thoni/Utveckling/c-xrefactory/tests/sandboxed_emacs/.c-xrefrc" -p "CURDIR" | ||
end-of-options | ||
|
||
<sync> | ||
<available-refactorings> | ||
<int val=10 len=<n>></int> | ||
<int val=40 len=<n>></int> | ||
<int val=50 len=<n>></int> | ||
<int val=60 len=<n>></int> | ||
<int val=70 len=<n>></int> | ||
<int val=300 len=<n>></int> | ||
</available-refactorings> | ||
-exit | ||
end-of-options | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters