Community
Participate
Working Groups
It would be nice to have some refactorings while writing buildfiles: 1. Something like "extract method" - You one task and could generate a <presetdef>. - You select multiple tasks and could generate a <macrodef>. - You select a <script> and could generate a <scriptdef>. (2) could be used inside 2. Introduce attributes (see "introduce parameters" on methods) <macrodef name="foo"> <sequential> <echo message="Hello World"/> </sequential> </macrodef> <foo/> would be <macrodef name="foo"> <attribute name="msg"/> <sequential> <echo message="@{msg}"/> </sequential> </macrodef> <foo msg="Hello World"/> 3. Convert <presetdef> to <macrodef> Rename <presetdef> to <macrodef> and include the <sequential> container. 4. Rename - rename of properties (dont know if it works already) - definitions by <*def> -- change the value in the name-attribute -- change the value in "tasks" -- example (from 2): foo --> myecho --- <macrodef name="myecho">... --- <myecho msg="... 5. Extract property - Select an attribute value and it will introduce a property with that value. <echo message="Hello World"/> converted to <property name="msg" value="Hello World"/> <echo message="${msg}"/> 6. Property bundle (see I18N-stuff) - gives a list with all properties - you select the properties to put into the new build.properties file - build.properties will be created and load into the build file
In Eclipse M6 there is rudimentary support for renaming of properties and targets. This is all that is planned for 3.1 due to time constraints and the 3.1 feature window effectively closing with the release of M6. Thanks for the great ideas though...
Ah - there is Ant. Havent found the right Product. Is there any possibility to search for that? Say searching with "Ant" and getting all products and components for Ant?
From https://bugs.eclipse.org/bugs/query.cgi, set the "Product" to be "Platform" and the "Component" to be "Ant". This will produce all the bugs related to the Eclipse Ant integration. Fill in the rest as desired to refine the search.
Just another ideas: 7. Externalize/inline scripts Script parts defined in <script> / <scriptdef> could be externalized into a new file. That new file could then be opened with a registered editor to get more IDE language support. <script language="javascript"> getProject().log("Hello World"); </script> ----- <script language="javascript" src="helloWorld.js"/> helloWorld.js: getProject().log("Hello World"); (helloWorld.js is typed in by the user while refactoring) 7. support for nested languages In <script> or <scriptdef> you use other languages like javascript, jython, bsh, etc. It would be helpful to get the "usual" help from the IDE as inside Java (starting with code formatting and syntaxhightlighting...) That support could be available if there is the right lanaguage plugin is registered.
While reading all the "New & Noteworthy" pages (MS1-MS7) to get an idea for a "What´s new in 3.1" workshop, I got another idea: 9. Pull up / push down In Java code this means moving between a class and it´s parent. Here it would move between the actual buildfile and an <import>ed one. Could also be done with Drag&Drop in the Outline View (drag target on <import>) or Package Explorer.
ping ;-)
Thanks for the ping Jan but limited features are planned for Ant in the 3.4 timeline and nothing of this scale.
I think, google summer of code perform new life for this ideas :)
I submit draft of proposal at http://wiki.eclipse.org/Ant_buildfile_refactorings You free add comments to it!
It was already listed on http://wiki.eclipse.org/Google_Summer_of_Code_2009_Ideas (5th 'real' entry). But I think the new wiki page is nice and should be linked from the ideas-page.
As you know - this year these refactorins ideas were posted to GSoC 2009 by me. And I was accepted :) With Darin Swanson ( Hello :) ) as a mentor.
(In reply to comment #11) > As you know - this year these refactorins ideas were posted to GSoC 2009 by me. > And I was accepted :) With Darin Swanson ( Hello :) ) as a mentor. How is this coming along?
Hi! I would like a little report on the work done. Now almost finished 4 features. Honestly, I had to fix an existing bug in order to implement this one. But now I really like the results.
Created attachment 142587 [details] Fix bug wiht renaming properties. Also add support of renaming tasks/macrodefs/presetdefs/scriptdefs. This patch fixes: bug, when Rename In File work incorrectly on properties or tasks with similar names. Also add support of renaming: macrodefs (including calls to them) macrodef`s attributes (inluding names at calls to mactodefs) correct renaming ts with the same name, but different namespace.
Created attachment 145358 [details] Correct RenameInFile with testcases of new functionality, ExtractTaskAction Add tests for new functionality at RenameInFileAction. Also move refactoring items to new submenu "Refactoring" Add ExtractTaskAction, but still unfixed bug with final step, when editor after refactoing start blinking.
Created attachment 147631 [details] First part of patch - just bugfix of existen RenameInFile action and tests for it. As I was asked - I devide my summer work on bugfix of RenameInfFile and new Exrtact task.
Created attachment 147632 [details] Correct RenameInFile with testcases of new functionality, ExtractTaskAction Add tests for new functionality at RenameInFileAction. Also move refactoring items to new submenu "Refactoring" Add ExtractTaskAction, but still unfixed bug with final step, when editor after refactoing start blinking. Removed unnessesary trash from pugins.xml
Any more movement on this?
First part of patch is tested, but it just fix (and improve :) ) existen bugs with renaming action. Second - new functionality, but still with bug: some problems with refreshing of editor after extracting task.
Is this going to be in for 3.6? :o
(In reply to comment #20) > Is this going to be in for 3.6? :o No this is not going to be 3.6
Chances for 3.7?
(In reply to comment #22) > Chances for 3.7? No chances
Anything happening in this area? I currently started using Antunit for doing unit tests of build scripts, and would love to have re-factoring as part of working TDD with build scripts.
(In reply to comment #24) > Anything happening in this area? > I currently started using Antunit for doing unit tests of build scripts, and > would love to have re-factoring as part of working TDD with build scripts. Sadly, no. There are no committer resources to work on this.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the stalebug whiteboard tag.