Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tigerstripe-dev] Packages

Hi Eric,
 
hope you're having fun. I'm wildly jetlagged so am sleeping at odd times!
 
So I've been working on packages and have come up with a few items where I have had to make some decisions and I'd like to run them past you...
 
Naming :
 
1. When we do a getPackage() I think we should return the "parent" package, and getName() should return the name of this package - so the FQN is the same as the package we are representing.
2. isAbstract makes no sense - so I removed it from the wizard - same for Extending Artifact.
 
We proposed that the packageArtifact lives in a ".package" file in the package concerned. I struggled with the extract stuff, as I was trying todo some dodgy mapping between "real" and imagined packages...I now realise that I can put anything I like in the .package file because the java auditor won't look at it!
 
So - having crossed that pointless barrier...I realised that the explorer behaviour needs to be different based on whether the Package Artifact type is enabled in the profile.
 
If ENABLED:
Wizard will create a true package plus a PackageArtifact
Explorer will have an "Open in Editor" option for the package (right click).
If the corresponding PackageArtifact does not exist, then this should create it "under the covers".
The "New Package" action should call the New Package Wizard - (as will an explicit NewWizardAction).
 
Creating ANY artifact should check for PackageArtifacts up the tree and create "under the covers" for all packages. SHOULD WE OPEN THE EDITOR FOR ALL NEWLY CREATED PACKAGEARTIFACTS?
 
HOW DO WE HANDLE PACKAGES WITH NO PACKAGEARTIFACT IN MODULES OR REFERENCED PROJECTS?
 
AbstractArtifact.getContainingComponent() will return a PackageArtifact
AbstractArtifact.getContainedComponents() will return lots of things for a Package, nothing for other ArtifactTypes (or should they return all the children - Fields etc)
 
Question here is whether this stuff should be cached?
 
Plugins should have a getPackageArtifacts() collection in the context and the ability to select that as a Artifact type in a rule.
This collection may need to be filled with "dummy" PackageArtifacts if there are any missing .package files for a "real" package.
 
Add an audit rule to check for .package files for all real packages. (This will be horrible if we enable packageArtifacts for existing large projects!)
 
If DISABLED:
Explorer will just have the basic "new Package" action (ie as now)
 
AbstractArtifact.getContainingComponent() will return an empty collection.
AbstractArtifact.getContainedComponents() - will not have any artifacts in - same question as above re Fields etc.
 
 
I'm getting near to looking at some of these odd cases, so let me know of any thoughts!
 
I also need some icons!
 
 
RC
 
 
 
 
 
 
 
 
 
 
 
 

Back to the top