Community
Participate
Working Groups
Just like the project name, there are certain values of a project that should be unique between different nature instances of a project. In an attempt to update these values during a Paste operation, we are extending CopyProjectAction and its helper classes. ProjectLocationSelectionDialog is the big bottleneck here. CopyProjectAction (which actually runs on a Paste) can be overridden, and its queryDestinationParameters() method can be enhanced, but all of ProjectLocationSelectionDialog's fields and methods are private. If checkValid() could be made protected, and the text in projectNameField and locationPathField were made accessible, ProjectLocationSelectionDialog would become extensible. (Note that checkValid() would give us access to both the statusMessageLabel and automatic enabling of the OK button.) Optionally, createNameListener() and createLocationListener() could also be made protected in case additional work is needed there.
Please clarify what you're really trying to do (i.e. what other data needs to be unique). Subclassing the action will only work in your views, not if you copy the project in the Navigator. We may be able to come up with a more general solution.
In our case, the most pressing item is the Web Project's context root. By default, we would like it to be the same as the new Project name, which we can't (easily) get to via the ProjectLocationSelectionDialog (it is all private). The user can also modify the context root independent of the project name. We would also like to ensure that the context root is not blank and is valid, but checkValid() is private, and enables/disables the OK button according to its own rules. We have other stuff that we would like to contribute to the Paste dialog, such as the selection of an EAR project for the various J2EE projects (EJBs, WARs, etc). These types of (project nature specific) values are able to be set during creation via the Wizard framework. They can also be modified via the Properties of the project. However, when a paste is done, the various natures of the project are just copied, with no extension of Paste allowed in the Navigator.
This is one example of how people want to extend our existing actions in nontrivial ways. Another example is JDT, who want to extend refresh (whether in the Navigator or packages view) to refresh both the workspace and external jars (with progress monitoring).
There are currently no plans to work on this feature