Bug 21426 - [Workbench] Pasting a project needs to be more extensible
Summary: [Workbench] Pasting a project needs to be more extensible
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All other
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-07-09 17:49 EDT by Carl Anderson CLA
Modified: 2006-06-22 08:34 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2002-07-09 17:49:07 EDT
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.
Comment 1 Nick Edgar CLA 2002-07-11 15:54:11 EDT
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.
Comment 2 Carl Anderson CLA 2002-07-23 17:30:46 EDT
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.
Comment 3 Nick Edgar CLA 2002-07-25 10:10:03 EDT
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).
Comment 4 Tod Creasey CLA 2006-06-22 08:34:37 EDT
There are currently no plans to work on this feature