felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsav...@apache.org
Subject svn commit: r796467 [1/25] - in /felix/trunk/sigil: common/core.tests/src/org/apache/felix/sigil/core/ common/core/src/org/apache/felix/sigil/bnd/ common/core/src/org/apache/felix/sigil/config/ common/core/src/org/apache/felix/sigil/core/ common/core/s...
Date Tue, 21 Jul 2009 18:51:41 GMT
Author: dsavage
Date: Tue Jul 21 18:51:33 2009
New Revision: 796467

URL: http://svn.apache.org/viewvc?rev=796467&view=rev
Log:
FELIX-1322 bulk update of formatting based on eclipse style referenced in http://felix.apache.org/site/coding-standards.html

Modified:
    felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/BundleModelElementTest.java
    felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/ConfigTest.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/bnd/BundleBuilder.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldAttr.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldConfig.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldConverter.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldFactory.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldUtil.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/IBldProject.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/IRepositoryConfig.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/BldCore.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/license/LicenseManager.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/license/LicensePolicy.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/model/eclipse/DownloadJar.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/model/eclipse/Library.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/model/eclipse/LibraryImport.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/model/eclipse/SigilBundle.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/model/osgi/BundleModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/model/osgi/PackageExport.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/model/osgi/PackageImport.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/internal/model/osgi/RequiredBundle.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/licence/ILicenseManager.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/licence/ILicensePolicy.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/repository/BundleResolver.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/repository/DirectoryHelper.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/repository/FileSystemRepository.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/repository/FileSystemRepositoryProvider.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/repository/ProgressWrapper.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/repository/SystemRepository.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/repository/SystemRepositoryProvider.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/core/util/QuoteUtil.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/AbstractCompoundModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/AbstractModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ICompoundModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IDependency.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IDependent.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IDependentModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelInfo.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelWalker.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/INamedModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IRequirementModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/InvalidModelException.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ModelElementFactory.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ModelElementFactoryException.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ModelElementSupport.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/OverrideOptions.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/Required.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/And.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/Cardinality.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/ExprVisitor.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/Expressions.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/FilterValidator.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/LDAPExpr.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/LDAPParseException.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/LDAPParser.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/Not.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/Ops.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/Or.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/ParseState.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/SimpleTerm.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/Utils.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/VersionRange.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/common/VersionRangeBoundingRule.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/eclipse/IDownloadJar.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/eclipse/ILibrary.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/eclipse/ILibraryImport.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/eclipse/INewtonSystem.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/eclipse/ISCAComposite.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/eclipse/ISigilBundle.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/osgi/IBundleModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/osgi/IPackageExport.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/osgi/IPackageImport.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/osgi/IPackageModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/osgi/IRequiredBundle.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/osgi/IVersionRangeModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/osgi/IVersionedModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/AbstractBundleRepository.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/AbstractRepositoryManager.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IBundleRepository.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IBundleRepositoryListener.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IBundleResolver.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IProviderChangeListener.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IRepositoryChangeListener.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IRepositoryManager.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IRepositoryProvider.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IRepositoryVisitor.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IResolution.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/IResolutionMonitor.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/RepositoryChangeEvent.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/RepositoryException.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/ResolutionConfig.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/ResolutionException.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/repository/ResolutionMonitorAdapter.java
    felix/trunk/sigil/common/junit/src/org/apache/felix/sigil/junit/AbstractSigilTestCase.java
    felix/trunk/sigil/common/junit/src/org/apache/felix/sigil/junit/ReflectiveSigilTestCase.java
    felix/trunk/sigil/common/junit/src/org/apache/felix/sigil/junit/activator/Activator.java
    felix/trunk/sigil/common/junit/src/org/apache/felix/sigil/junit/server/JUnitService.java
    felix/trunk/sigil/common/junit/src/org/apache/felix/sigil/junit/server/impl/JUnitServiceFactory.java
    felix/trunk/sigil/common/junit/src/org/apache/felix/sigil/junit/server/impl/JUnitServiceImpl.java
    felix/trunk/sigil/common/junit/src/org/apache/felix/sigil/junit/server/impl/TestClassListener.java
    felix/trunk/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java
    felix/trunk/sigil/common/obr/src/org/apache/felix/sigil/obr/CachingOBRBundleRepository.java
    felix/trunk/sigil/common/obr/src/org/apache/felix/sigil/obr/NonCachingOBRBundleRepository.java
    felix/trunk/sigil/common/obr/src/org/apache/felix/sigil/obr/OBRHandler.java
    felix/trunk/sigil/common/obr/src/org/apache/felix/sigil/obr/OBRListener.java
    felix/trunk/sigil/common/obr/src/org/apache/felix/sigil/obr/OBRRepositoryProvider.java
    felix/trunk/sigil/common/obr/src/org/apache/felix/sigil/obr/VersionRangeHelper.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/SigilCore.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/install/IOSGiInstall.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/install/IOSGiInstallBuilder.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/install/IOSGiInstallManager.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/install/IOSGiInstallType.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/install/OSGiInstall.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/install/OSGiInstallType.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/adapter/FileAdaptorFactory.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/adapter/ProjectAdaptorFactory.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/builders/BuildConsole.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/builders/SigilIncrementalProjectBuilder.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/install/OSGiInstallManager.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/SigilModelRoot.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/SigilProject.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryConfiguration.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryModel.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryType.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/GlobalRepositoryManager.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/OSGiInstallRepository.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/OSGiInstallRepositoryProvider.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/SigilRepositoryManager.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/WorkspaceRepository.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/WorkspaceRepositoryProvider.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/job/ResolveProjectsJob.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/job/ThreadProgressMonitor.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/ISigilModelRoot.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/ISigilProjectModel.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositoryConfiguration.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositoryModel.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositorySet.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositoryType.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/RepositorySet.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/Grep.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/ModelHelper.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/ProfileManager.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/nature/SigilProjectNature.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/preferences/PrefsUtils.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/preferences/PromptablePreference.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/preferences/SigilPreferencesInitializer.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/property/SigilPropertyTester.java
    felix/trunk/sigil/eclipse/help/src/org/apache/felix/sigil/eclipse/cheatsheets/actions/AbstractNewWizardAction.java
    felix/trunk/sigil/eclipse/help/src/org/apache/felix/sigil/eclipse/cheatsheets/actions/CopyResourceFromPlugin.java
    felix/trunk/sigil/eclipse/help/src/org/apache/felix/sigil/eclipse/cheatsheets/actions/OpenEmptySigilProjectWizardAction.java
    felix/trunk/sigil/eclipse/help/src/org/apache/felix/sigil/eclipse/cheatsheets/actions/ResolveProjectDependencies.java
    felix/trunk/sigil/eclipse/help/src/org/apache/felix/sigil/eclipse/cheatsheets/actions/ShowViewAction.java
    felix/trunk/sigil/eclipse/help/src/org/apache/felix/sigil/eclipse/help/Activator.java
    felix/trunk/sigil/eclipse/obr/src/org/apache/felix/sigil/obr/eclipse/Activator.java
    felix/trunk/sigil/eclipse/obr/src/org/apache/felix/sigil/obr/eclipse/OBRRepositoryWizard.java
    felix/trunk/sigil/eclipse/obr/src/org/apache/felix/sigil/obr/eclipse/OBRRepositoryWizardPage.java
    felix/trunk/sigil/eclipse/search/src/org/apache/felix/sigil/search/ISearchResult.java
    felix/trunk/sigil/eclipse/search/src/org/apache/felix/sigil/search/SigilSearch.java
    felix/trunk/sigil/eclipse/search/src/org/apache/felix/sigil/search/index/Index.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/actions/DisplayAction.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/actions/PruneProjectDependenciesAction.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/actions/RefreshRepositoryAction.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/actions/ResolveProjectDependenciesAction.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/classpath/SigilClassPathContainer.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/classpath/SigilClasspathContainerInitializer.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/classpath/SigilLibraryPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/handlers/AbstractResourceCommandHandler.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/handlers/EditorResourceCommandHandler.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/handlers/IResourceCommandHandler.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/handlers/SelectionResourceCommandHandler.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/handlers/project/ConvertProjectCommandHandler.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/handlers/project/ConvertProjectHandler.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/handlers/project/RefreshSigilClasspathCommandHandler.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/handlers/project/RefreshSigilClasspathHandler.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/startup/SigilStartup.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/SigilUI.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/completion/CompletionProposal.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/AbstractResourceSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/BundleDependencySection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ClasspathSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ContainerTreeProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ContentSummarySection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ContentsForm.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/DependenciesForm.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/DependencyManagementSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/DownloadSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ExcludedResourcesFilter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ExportPackagesSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ExportsForm.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/GeneralInfoSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/IDependencyChecker.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/IElementDescriptor.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ImportPackagesSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/NewPackageExportDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/NewResourceSelectionDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/OverviewForm.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/PackageExportDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ProjectLabelProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ProjectTableViewer.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/PropertiesForm.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/RequiresBundleSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ResourceBuildSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ResourceImportDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ResourceSelectDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/SigilProjectEditorPart.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/SigilSourcePage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/TestingSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/ToolsSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/VersionRangeComponent.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/VersionsChangeListener.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/editors/project/WrappedContentProposal.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/form/IFormValueConverter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/form/ISigilFormEntryListener.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/form/SigilFormEntry.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/form/SigilFormEntryAdapter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/form/SigilPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/form/SigilSection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/internal/repository/FileSystemRepositoryWizard.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/internal/repository/FileSystemRepositoryWizardPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/internal/repository/OSGiInstallRepositoryWizard.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/internal/repository/OSGiInstallRepositoryWizardPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/perspective/SigilPerspectiveFactory.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/ExcludedResourcesPrefsPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/LibraryConfigurationDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/LibraryPreferencePage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/OptionalPrompt.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/ProjectDependentPreferencesPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/SigilPreferencePage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/VersionsPreferencePage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/installs/OSGiInstallsPreferencePage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/project/ProjectPropertyPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/NewRepositoryWizard.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/RepositoriesPreferencePage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/RepositoriesView.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/RepositorySetDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/RepositorySetsView.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/RepositoryTypeSelectionPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/RepositoryViewData.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/RepositoryWizardNode.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/preferences/repository/WizardHelper.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/quickfix/ImportPackageProposal.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/quickfix/ImportQuickFixProcessor.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/quickfix/ImportSearchResultProposal.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/quickfix/ImportedClassReference.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/refactor/RenameCompositeRefactoring.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/AccumulatorAdapter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/BackgroundLoadingSelectionDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/ColumnModelLabelProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/DefaultContentProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/DefaultLabelProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/DefaultTableProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/DefaultTreeContentProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/ExclusionContentProposalProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/ExportedPackageFinder.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/FileUtils.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/IAccumulator.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/IExportToImportConverter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/IFilter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/IValidationListener.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/ModelLabelProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/PackageFilter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/ProjectUtils.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/ResourceReviewDialog.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/ResourcesDialogHelper.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/SingletonSelection.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/util/WrappedContentProposalLabelProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/ModelElementComparator.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/RepositoryViewPart.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/resolution/BundleConnectionHighlighter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/resolution/BundleGraph.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/resolution/BundleGraphContentProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/resolution/BundleGraphLabelProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/resolution/BundleGraphViewFilter.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/resolution/BundleResolverView.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/resolution/EditorViewPartListener.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/resolution/Link.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/wizard/SigilNewResourceWizard.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/wizard/WorkspaceContentProvider.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/wizard/project/SigilProjectWizard.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/wizard/project/SigilProjectWizardFirstPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/wizard/project/SigilProjectWizardSecondPage.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/wizard/repository/RepositoryWizard.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/wizard/repository/RepositoryWizardPage.java
    felix/trunk/sigil/eclipse/utils/src/org/apache/felix/sigil/utils/GlobCompiler.java
    felix/trunk/sigil/eclipse/utils/src/org/apache/felix/sigil/utils/PathHelper.java
    felix/trunk/sigil/eclipse/utils/src/org/apache/felix/sigil/utils/SigilUtils.java
    felix/trunk/sigil/eclipse/utils/src/org/apache/felix/sigil/utils/properties/EditorPropertyTester.java
    felix/trunk/sigil/eclipse/utils/src/org/apache/felix/sigil/utils/properties/PartKindPropertyTester.java
    felix/trunk/sigil/eclipse/utils/src/org/apache/felix/sigil/utils/properties/ResourceTypePropertyTester.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ant/BundleInfoTask.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ant/BundleTask.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/BldRepositoryManager.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/BldResolver.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/FindUtil.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/IBldResolver.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/Log.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/ProjectRepository.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/ProjectRepositoryProvider.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/SigilParser.java
    felix/trunk/sigil/ivy/resolver/src/org/apache/felix/sigil/ivy/SigilResolver.java
    felix/trunk/sigil/sigil-builder/src/org/apache/felix/sigil/build/Feature.java
    felix/trunk/sigil/sigil-builder/src/org/apache/felix/sigil/build/FindBundlesTask.java
    felix/trunk/sigil/sigil-builder/src/org/apache/felix/sigil/build/SiteInsertFeatureContentHandler.java
    felix/trunk/sigil/sigil-builder/src/org/apache/felix/sigil/build/SiteInsertFeatures.java

Modified: felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/BundleModelElementTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/BundleModelElementTest.java?rev=796467&r1=796466&r2=796467&view=diff
==============================================================================
--- felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/BundleModelElementTest.java (original)
+++ felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/BundleModelElementTest.java Tue Jul 21 18:51:33 2009
@@ -19,6 +19,7 @@
 
 package org.apache.felix.sigil.core;
 
+
 import java.util.Arrays;
 
 import org.apache.felix.sigil.core.internal.model.osgi.BundleModelElement;
@@ -28,69 +29,82 @@
 
 import junit.framework.TestCase;
 
-public class BundleModelElementTest extends TestCase {
 
-	public BundleModelElementTest(String name) {
-		super(name);
-	}
-	
-	public void testAddRequires() {
-		BundleModelElement element = new BundleModelElement();
-		checkRequires(element);
-	}
-	
-	public void testAddImports() {
-		BundleModelElement element = new BundleModelElement();
-		checkImports(element);
-	}
-	
-	public void testAddImportsAndRequires() {
-		BundleModelElement element = new BundleModelElement();
-		checkImports(element);
-		checkRequires(element);
-		
-		element = new BundleModelElement();
-		checkRequires(element);
-		checkImports(element);
-	}
-	
-	private void checkImports(BundleModelElement element) {
-		PackageImport foo = new PackageImport();
-		foo.setPackageName("foo");
-		foo.setVersions( VersionRange.parseVersionRange("1.0.0") );
-		PackageImport bar = new PackageImport();
-		bar.setPackageName( "bar" );
-		bar.setVersions( VersionRange.parseVersionRange("[2.2.2, 3.3.3]") );
-		PackageImport baz = new PackageImport();
-		baz.setPackageName( "baz" );
-		baz.setVersions( VersionRange.parseVersionRange("[3.0.0, 4.0.0)") );
-		
-		element.addChild(foo.clone());
-		element.addChild(bar.clone());
-		element.addChild(baz.clone());
-		
-		assertTrue( Arrays.asList(element.children()).contains(foo) );
-		assertTrue( Arrays.asList(element.children()).contains(bar) );
-		assertTrue( Arrays.asList(element.children()).contains(baz) );
-	}
-
-	private void checkRequires(BundleModelElement element) {
-		RequiredBundle foo = new RequiredBundle();
-		foo.setSymbolicName( "foo" );
-		foo.setVersions( VersionRange.parseVersionRange("1.0.0") );
-		RequiredBundle bar = new RequiredBundle();
-		bar.setSymbolicName( "bar" );
-		bar.setVersions( VersionRange.parseVersionRange("[2.2.2, 3.3.3]") );
-		RequiredBundle baz = new RequiredBundle();
-		baz.setSymbolicName( "baz" );
-		baz.setVersions( VersionRange.parseVersionRange("[3.0.0, 4.0.0)") );
-		
-		element.addChild(foo.clone());
-		element.addChild(bar.clone());
-		element.addChild(baz.clone());
-		
-		assertTrue( Arrays.asList(element.children()).contains(foo) );
-		assertTrue( Arrays.asList(element.children()).contains(bar) );
-		assertTrue( Arrays.asList(element.children()).contains(baz) );
-	}
+public class BundleModelElementTest extends TestCase
+{
+
+    public BundleModelElementTest( String name )
+    {
+        super( name );
+    }
+
+
+    public void testAddRequires()
+    {
+        BundleModelElement element = new BundleModelElement();
+        checkRequires( element );
+    }
+
+
+    public void testAddImports()
+    {
+        BundleModelElement element = new BundleModelElement();
+        checkImports( element );
+    }
+
+
+    public void testAddImportsAndRequires()
+    {
+        BundleModelElement element = new BundleModelElement();
+        checkImports( element );
+        checkRequires( element );
+
+        element = new BundleModelElement();
+        checkRequires( element );
+        checkImports( element );
+    }
+
+
+    private void checkImports( BundleModelElement element )
+    {
+        PackageImport foo = new PackageImport();
+        foo.setPackageName( "foo" );
+        foo.setVersions( VersionRange.parseVersionRange( "1.0.0" ) );
+        PackageImport bar = new PackageImport();
+        bar.setPackageName( "bar" );
+        bar.setVersions( VersionRange.parseVersionRange( "[2.2.2, 3.3.3]" ) );
+        PackageImport baz = new PackageImport();
+        baz.setPackageName( "baz" );
+        baz.setVersions( VersionRange.parseVersionRange( "[3.0.0, 4.0.0)" ) );
+
+        element.addChild( foo.clone() );
+        element.addChild( bar.clone() );
+        element.addChild( baz.clone() );
+
+        assertTrue( Arrays.asList( element.children() ).contains( foo ) );
+        assertTrue( Arrays.asList( element.children() ).contains( bar ) );
+        assertTrue( Arrays.asList( element.children() ).contains( baz ) );
+    }
+
+
+    private void checkRequires( BundleModelElement element )
+    {
+        RequiredBundle foo = new RequiredBundle();
+        foo.setSymbolicName( "foo" );
+        foo.setVersions( VersionRange.parseVersionRange( "1.0.0" ) );
+        RequiredBundle bar = new RequiredBundle();
+        bar.setSymbolicName( "bar" );
+        bar.setVersions( VersionRange.parseVersionRange( "[2.2.2, 3.3.3]" ) );
+        RequiredBundle baz = new RequiredBundle();
+        baz.setSymbolicName( "baz" );
+        baz.setVersions( VersionRange.parseVersionRange( "[3.0.0, 4.0.0)" ) );
+
+        element.addChild( foo.clone() );
+        element.addChild( bar.clone() );
+        element.addChild( baz.clone() );
+
+        assertTrue( Arrays.asList( element.children() ).contains( foo ) );
+        assertTrue( Arrays.asList( element.children() ).contains( bar ) );
+        assertTrue( Arrays.asList( element.children() ).contains( baz ) );
+    }
 }

Modified: felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/ConfigTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/ConfigTest.java?rev=796467&r1=796466&r2=796467&view=diff
==============================================================================
--- felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/ConfigTest.java (original)
+++ felix/trunk/sigil/common/core.tests/src/org/apache/felix/sigil/core/ConfigTest.java Tue Jul 21 18:51:33 2009
@@ -19,6 +19,7 @@
 
 package org.apache.felix.sigil.core;
 
+
 import java.io.IOException;
 import java.net.URI;
 import java.util.Set;
@@ -33,39 +34,47 @@
 import org.apache.felix.sigil.model.osgi.IBundleModelElement;
 import org.apache.felix.sigil.model.osgi.IPackageImport;
 
-public class ConfigTest extends TestCase {
-	
-	static final URI base = URI.create("test/ConfigTest/sigil.properties");
-
-	public ConfigTest(String name) {
-		super(name);
-	}
-	
-	public void testSimple() throws IOException {
-		IBldProject project = BldFactory.getProject(base.resolve("test1.properties"));
-		
-		ISigilBundle bundle = project.getDefaultBundle();
-		IBundleModelElement info = bundle.getBundleInfo();
-		
-		checkImports(info.getImports());
-		
-		//IBundleModelElement requirements = project.getRequirements();
-	}
-	
-	private void checkImports(Set<IPackageImport> imports) {
-		PackageImport foo = new PackageImport();
-		foo.setPackageName("foo");
-		foo.setVersions(VersionRange.parseVersionRange("1.0.0"));
-		PackageImport bar = new PackageImport();
-		bar.setPackageName( "bar" );
-		bar.setVersions(VersionRange.parseVersionRange("[2.2.2, 3.3.3]"));
-		PackageImport baz = new PackageImport();
-		baz.setPackageName( "baz" );
-		baz.setVersions(VersionRange.parseVersionRange("[3.0.0, 4.0.0)"));
-		
-		assertTrue(foo.toString(), imports.contains(foo));
-		assertTrue(bar.toString(), imports.contains(bar));
-		assertTrue(baz.toString(), imports.contains(baz));
-	}
+
+public class ConfigTest extends TestCase
+{
+
+    static final URI base = URI.create( "test/ConfigTest/sigil.properties" );
+
+
+    public ConfigTest( String name )
+    {
+        super( name );
+    }
+
+
+    public void testSimple() throws IOException
+    {
+        IBldProject project = BldFactory.getProject( base.resolve( "test1.properties" ) );
+
+        ISigilBundle bundle = project.getDefaultBundle();
+        IBundleModelElement info = bundle.getBundleInfo();
+
+        checkImports( info.getImports() );
+
+        //IBundleModelElement requirements = project.getRequirements();
+    }
+
+
+    private void checkImports( Set<IPackageImport> imports )
+    {
+        PackageImport foo = new PackageImport();
+        foo.setPackageName( "foo" );
+        foo.setVersions( VersionRange.parseVersionRange( "1.0.0" ) );
+        PackageImport bar = new PackageImport();
+        bar.setPackageName( "bar" );
+        bar.setVersions( VersionRange.parseVersionRange( "[2.2.2, 3.3.3]" ) );
+        PackageImport baz = new PackageImport();
+        baz.setPackageName( "baz" );
+        baz.setVersions( VersionRange.parseVersionRange( "[3.0.0, 4.0.0)" ) );
+
+        assertTrue( foo.toString(), imports.contains( foo ) );
+        assertTrue( bar.toString(), imports.contains( bar ) );
+        assertTrue( baz.toString(), imports.contains( baz ) );
+    }
 
 }

Modified: felix/trunk/sigil/common/core/src/org/apache/felix/sigil/bnd/BundleBuilder.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/common/core/src/org/apache/felix/sigil/bnd/BundleBuilder.java?rev=796467&r1=796466&r2=796467&view=diff
==============================================================================
--- felix/trunk/sigil/common/core/src/org/apache/felix/sigil/bnd/BundleBuilder.java (original)
+++ felix/trunk/sigil/common/core/src/org/apache/felix/sigil/bnd/BundleBuilder.java Tue Jul 21 18:51:33 2009
@@ -19,6 +19,7 @@
 
 package org.apache.felix.sigil.bnd;
 
+
 import static java.lang.String.format;
 
 import java.io.File;
@@ -52,11 +53,13 @@
 import aQute.lib.osgi.Jar;
 import aQute.lib.osgi.Processor;
 
-public class BundleBuilder {
+
+public class BundleBuilder
+{
     public static final String COMPONENT_ACTIVATOR_PKG = "XXX-FIXME-XXX";
     public static final String COMPONENT_ACTIVATOR = COMPONENT_ACTIVATOR_PKG + ".Activator";
-    public static final String[] COMPONENT_ACTIVATOR_DEPS = { "XXX-FIXME-XXX",
-            "org.osgi.framework", "org.osgi.util.tracker" };
+    public static final String[] COMPONENT_ACTIVATOR_DEPS =
+        { "XXX-FIXME-XXX", "org.osgi.framework", "org.osgi.util.tracker" };
     public static final String COMPONENT_DIR = "META-INF/XXX-FIXME-XXX";
     public static final String COMPONENT_FLAG = "Installable-Component";
     public static final String COMPONENT_LIST = "Installable-Component-Templates";
@@ -77,12 +80,15 @@
     private String codebaseFormat;
     private Set<String> systemPkgs;
 
-    public interface Log {
-        void warn(String msg);
+    public interface Log
+    {
+        void warn( String msg );
+
 
-        void verbose(String msg);
+        void verbose( String msg );
     }
 
+
     /**
      * creates a BundleBuilder.
      * 
@@ -93,7 +99,8 @@
      *            [ext] is replaced with "jar".
      * @param hashtable
      */
-    public BundleBuilder(IBldProject project, File[] classpath, String destPattern, Properties env) {
+    public BundleBuilder( IBldProject project, File[] classpath, String destPattern, Properties env )
+    {
         this.project = project;
         this.classpath = classpath;
         this.destPattern = destPattern;
@@ -101,116 +108,139 @@
 
         Properties options = project.getOptions();
 
-        addMissingImports = options.containsKey(BldAttr.OPTION_ADD_IMPORTS)
-                && Boolean.parseBoolean(options.getProperty(BldAttr.OPTION_ADD_IMPORTS));
-        omitUnusedImports = options.containsKey(BldAttr.OPTION_OMIT_IMPORTS)
-                && Boolean.parseBoolean(options.getProperty(BldAttr.OPTION_OMIT_IMPORTS));
+        addMissingImports = options.containsKey( BldAttr.OPTION_ADD_IMPORTS )
+            && Boolean.parseBoolean( options.getProperty( BldAttr.OPTION_ADD_IMPORTS ) );
+        omitUnusedImports = options.containsKey( BldAttr.OPTION_OMIT_IMPORTS )
+            && Boolean.parseBoolean( options.getProperty( BldAttr.OPTION_OMIT_IMPORTS ) );
 
-        defaultPubtype = options.getProperty(BldAttr.PUBTYPE_ATTRIBUTE, "rmi.codebase");
+        defaultPubtype = options.getProperty( BldAttr.PUBTYPE_ATTRIBUTE, "rmi.codebase" );
 
-        codebaseFormat = options.getProperty("codebaseFormat",
-                "cds://%1$s?bundle.symbolic.name=%2$s&type=%3$s");
+        codebaseFormat = options.getProperty( "codebaseFormat", "cds://%1$s?bundle.symbolic.name=%2$s&type=%3$s" );
 
-        for (IBldBundle b : project.getBundles()) {
+        for ( IBldBundle b : project.getBundles() )
+        {
             lastBundle = b.getId();
-            for (IPackageImport import1 : b.getImports()) {
-                if (import1.getOSGiImport().equals(IPackageImport.OSGiImport.AUTO)) {
-                    unused.add(import1.getPackageName());
+            for ( IPackageImport import1 : b.getImports() )
+            {
+                if ( import1.getOSGiImport().equals( IPackageImport.OSGiImport.AUTO ) )
+                {
+                    unused.add( import1.getPackageName() );
                 }
             }
         }
 
-        try {
+        try
+        {
             systemPkgs = new HashSet<String>();
-            Properties profile = SystemRepositoryProvider.readProfile(null);
-            String pkgs = profile.getProperty("org.osgi.framework.system.packages");
-            for (String pkg : pkgs.split(",\\s*")) {
-                systemPkgs.add(pkg);
+            Properties profile = SystemRepositoryProvider.readProfile( null );
+            String pkgs = profile.getProperty( "org.osgi.framework.system.packages" );
+            for ( String pkg : pkgs.split( ",\\s*" ) )
+            {
+                systemPkgs.add( pkg );
             }
-        } catch (IOException e) {
+        }
+        catch ( IOException e )
+        {
             // TODO Auto-generated catch block
             e.printStackTrace();
         }
     }
 
-    public List<String> errors() {
+
+    public List<String> errors()
+    {
         return errors;
     }
 
-    public List<String> warnings() {
+
+    public List<String> warnings()
+    {
         return warnings;
     }
 
+
     @SuppressWarnings("unchecked")
-    private void convertErrors(String prefix, List messages) {
+    private void convertErrors( String prefix, List messages )
+    {
         // TODO: make error mapping more generic
         final String jarEmpty = "The JAR is empty";
 
-        for (Object omsg : messages) {
-            if (jarEmpty.equals(omsg))
-                warnings.add(prefix + omsg);
+        for ( Object omsg : messages )
+        {
+            if ( jarEmpty.equals( omsg ) )
+                warnings.add( prefix + omsg );
             else
-                errors.add(prefix + omsg);
+                errors.add( prefix + omsg );
         }
     }
 
+
     @SuppressWarnings("unchecked")
-    private void convertWarnings(String prefix, List messages) {
-        for (Object omsg : messages) {
-            warnings.add(prefix + omsg);
+    private void convertWarnings( String prefix, List messages )
+    {
+        for ( Object omsg : messages )
+        {
+            warnings.add( prefix + omsg );
         }
     }
 
-    public boolean createBundle(IBldBundle bundle, boolean force, Log log) throws Exception {
-        int bracket = destPattern.indexOf('[');
-        if (bracket < 0) {
-            throw new Exception("destPattern MUST contain [id] or [name].");
+
+    public boolean createBundle( IBldBundle bundle, boolean force, Log log ) throws Exception
+    {
+        int bracket = destPattern.indexOf( '[' );
+        if ( bracket < 0 )
+        {
+            throw new Exception( "destPattern MUST contain [id] or [name]." );
         }
 
-        String dest = destPattern.replaceFirst("\\[id\\]", bundle.getId());
-        dest = dest.replaceFirst("\\[name\\]", bundle.getSymbolicName());
-        dest = dest.replaceFirst("\\[ext\\]", "jar");
+        String dest = destPattern.replaceFirst( "\\[id\\]", bundle.getId() );
+        dest = dest.replaceFirst( "\\[name\\]", bundle.getSymbolicName() );
+        dest = dest.replaceFirst( "\\[ext\\]", "jar" );
 
-        bracket = dest.indexOf('[');
-        if (bracket >= 0) {
-            String token = dest.substring(bracket);
-            throw new Exception("destPattern: expected [id] or [name]: " + token);
+        bracket = dest.indexOf( '[' );
+        if ( bracket >= 0 )
+        {
+            String token = dest.substring( bracket );
+            throw new Exception( "destPattern: expected [id] or [name]: " + token );
         }
 
         errors.clear();
         warnings.clear();
 
-        if (!bundle.getDownloadContents().isEmpty()) {
+        if ( !bundle.getDownloadContents().isEmpty() )
+        {
             // create dljar
             Properties dlspec = new Properties();
             StringBuilder sb = new StringBuilder();
 
-            for (String pkg : bundle.getDownloadContents()) {
-                if (sb.length() > 0)
-                    sb.append(",");
-                sb.append(pkg);
+            for ( String pkg : bundle.getDownloadContents() )
+            {
+                if ( sb.length() > 0 )
+                    sb.append( "," );
+                sb.append( pkg );
             }
 
-            dlspec.setProperty(Constants.PRIVATE_PACKAGE, sb.toString());
-            dlspec.setProperty(Constants.BUNDLE_NAME, "Newton download jar");
-            dlspec.setProperty(Constants.NOEXTRAHEADERS, "true");
+            dlspec.setProperty( Constants.PRIVATE_PACKAGE, sb.toString() );
+            dlspec.setProperty( Constants.BUNDLE_NAME, "Newton download jar" );
+            dlspec.setProperty( Constants.NOEXTRAHEADERS, "true" );
             // stop it being a bundle, so cds doesn't scan it
-            dlspec.setProperty(Constants.REMOVE_HEADERS, Constants.BUNDLE_SYMBOLICNAME);
+            dlspec.setProperty( Constants.REMOVE_HEADERS, Constants.BUNDLE_SYMBOLICNAME );
 
             Builder builder = new Builder();
-            builder.setProperties(dlspec);
-            builder.setClasspath(classpath);
+            builder.setProperties( dlspec );
+            builder.setClasspath( classpath );
 
             Jar dljar = builder.build();
-            convertErrors("BND (dljar): ", builder.getErrors());
-            convertWarnings("BND (dljar): ", builder.getWarnings());
+            convertErrors( "BND (dljar): ", builder.getErrors() );
+            convertWarnings( "BND (dljar): ", builder.getWarnings() );
 
-            String dldest = dest.replaceFirst("\\.jar$", "-dl.jar");
-            File dloutput = new File(dldest);
-            if (!dloutput.exists() || dloutput.lastModified() <= dljar.lastModified() || force) {
+            String dldest = dest.replaceFirst( "\\.jar$", "-dl.jar" );
+            File dloutput = new File( dldest );
+            if ( !dloutput.exists() || dloutput.lastModified() <= dljar.lastModified() || force )
+            {
                 // jar.write(dldest) catches and ignores IOException
-                OutputStream out = new FileOutputStream(dldest);
-                dljar.write(out);
+                OutputStream out = new FileOutputStream( dldest );
+                dljar.write( out );
                 out.close();
                 dljar.close();
                 // XXX deleting dljar causes it to be rebuilt each time
@@ -221,46 +251,51 @@
             builder.close();
         }
 
-        Properties spec = getBndSpec(bundle, dest);
+        Properties spec = getBndSpec( bundle, dest );
 
-        if (log != null) {
-            log.verbose("BND instructions: " + spec.toString());
+        if ( log != null )
+        {
+            log.verbose( "BND instructions: " + spec.toString() );
         }
 
         Builder builder = new Builder();
-        builder.setPedantic(true);
-        builder.setProperties(spec);
-        builder.mergeProperties(env, false);
+        builder.setPedantic( true );
+        builder.setProperties( spec );
+        builder.mergeProperties( env, false );
 
-        builder.setClasspath(classpath);
+        builder.setClasspath( classpath );
         // builder.setSourcepath(sourcepath);
 
         Jar jar = builder.build();
 
-        convertErrors("BND: ", builder.getErrors());
-        convertWarnings("BND: ", builder.getWarnings());
+        convertErrors( "BND: ", builder.getErrors() );
+        convertWarnings( "BND: ", builder.getWarnings() );
 
-        augmentImports(builder, jar, bundle);
+        augmentImports( builder, jar, bundle );
 
-        if (log != null) {
-            for (String warn : warnings) {
-                log.warn(warn);
+        if ( log != null )
+        {
+            for ( String warn : warnings )
+            {
+                log.warn( warn );
             }
         }
 
-        if (!errors.isEmpty()) {
-            throw new Exception(errors.toString());
+        if ( !errors.isEmpty() )
+        {
+            throw new Exception( errors.toString() );
         }
 
         boolean modified = false;
-        File output = new File(dest);
+        File output = new File( dest );
 
-        if (!output.exists() || force || (output.lastModified() <= jar.lastModified())
-                || (output.lastModified() <= project.getLastModified())) {
+        if ( !output.exists() || force || ( output.lastModified() <= jar.lastModified() )
+            || ( output.lastModified() <= project.getLastModified() ) )
+        {
             modified = true;
             // jar.write(dest) catches and ignores IOException
-            OutputStream out = new FileOutputStream(dest);
-            jar.write(out);
+            OutputStream out = new FileOutputStream( dest );
+            jar.write( out );
             out.close();
             jar.close();
         }
@@ -270,12 +305,14 @@
         return modified;
     }
 
-    private void augmentImports(Builder builder, Jar jar, IBldBundle bundle) throws IOException {
+
+    private void augmentImports( Builder builder, Jar jar, IBldBundle bundle ) throws IOException
+    {
         Attributes main = jar.getManifest().getMainAttributes();
-        String impHeader = main.getValue(Constants.IMPORT_PACKAGE);
-        Map<String, Map<String, String>> bndImports = Processor.parseHeader(impHeader, builder);
+        String impHeader = main.getValue( Constants.IMPORT_PACKAGE );
+        Map<String, Map<String, String>> bndImports = Processor.parseHeader( impHeader, builder );
 
-        if (bndImports.isEmpty())
+        if ( bndImports.isEmpty() )
             return;
 
         ArrayList<String> self = new ArrayList<String>();
@@ -283,204 +320,243 @@
         ArrayList<String> modified = new ArrayList<String>();
         ArrayList<String> unversioned = new ArrayList<String>();
 
-        String expHeader = main.getValue(Constants.EXPORT_PACKAGE);
-        Set<String> bndExports = Processor.parseHeader(expHeader, builder).keySet();
+        String expHeader = main.getValue( Constants.EXPORT_PACKAGE );
+        Set<String> bndExports = Processor.parseHeader( expHeader, builder ).keySet();
 
         HashMap<String, IPackageImport> imports = new HashMap<String, IPackageImport>();
-        for (IPackageImport pi : getImports(bundle)) {
-            switch (pi.getOSGiImport()) {
-            case NEVER:
-                break;
-            case ALWAYS:
-                String pkg = pi.getPackageName();
-                if (!bndImports.containsKey(pkg)) {
-                    // Bnd doesn't think this import is needed - but we know
-                    // better
-                    HashMap<String, String> attrs = new HashMap<String, String>();
-                    attrs.put(BldAttr.VERSION_ATTRIBUTE, pi.getVersions().toString());
-                    bndImports.put(pkg, attrs);
-                    modified.add(pkg + ";resolve=runtime");
-                }
-                // fall thru */
-            case AUTO:
-                imports.put(pi.getPackageName(), pi);
-                break;
+        for ( IPackageImport pi : getImports( bundle ) )
+        {
+            switch ( pi.getOSGiImport() )
+            {
+                case NEVER:
+                    break;
+                case ALWAYS:
+                    String pkg = pi.getPackageName();
+                    if ( !bndImports.containsKey( pkg ) )
+                    {
+                        // Bnd doesn't think this import is needed - but we know
+                        // better
+                        HashMap<String, String> attrs = new HashMap<String, String>();
+                        attrs.put( BldAttr.VERSION_ATTRIBUTE, pi.getVersions().toString() );
+                        bndImports.put( pkg, attrs );
+                        modified.add( pkg + ";resolve=runtime" );
+                    }
+                    // fall thru */
+                case AUTO:
+                    imports.put( pi.getPackageName(), pi );
+                    break;
             }
         }
 
         boolean importDot = false;
 
-        for (String pkg : bndImports.keySet()) {
-            unused.remove(pkg);
-            Map<String, String> attrs = bndImports.get(pkg);
-            String currentVersion = (String) attrs.get(BldAttr.VERSION_ATTRIBUTE);
-            IPackageImport pi = imports.get(pkg);
+        for ( String pkg : bndImports.keySet() )
+        {
+            unused.remove( pkg );
+            Map<String, String> attrs = bndImports.get( pkg );
+            String currentVersion = ( String ) attrs.get( BldAttr.VERSION_ATTRIBUTE );
+            IPackageImport pi = imports.get( pkg );
 
-            if (pi != null) {
+            if ( pi != null )
+            {
                 VersionRange range = pi.getVersions();
                 String version = range.toString();
 
-                if (!version.equals(currentVersion) && !range.equals(VersionRange.ANY_VERSION)) {
-                    attrs.put(BldAttr.VERSION_ATTRIBUTE, version);
-                    if (pi.isOptional())
-                        attrs.put(BldAttr.RESOLUTION_ATTRIBUTE, BldAttr.RESOLUTION_OPTIONAL);
-                    modified
-                            .add(pkg + ";version=" + version + (pi.isOptional() ? ";optional" : ""));
-                } else if ((currentVersion == null) && !systemPkgs.contains(pkg)) {
-                    unversioned.add(pkg);
+                if ( !version.equals( currentVersion ) && !range.equals( VersionRange.ANY_VERSION ) )
+                {
+                    attrs.put( BldAttr.VERSION_ATTRIBUTE, version );
+                    if ( pi.isOptional() )
+                        attrs.put( BldAttr.RESOLUTION_ATTRIBUTE, BldAttr.RESOLUTION_OPTIONAL );
+                    modified.add( pkg + ";version=" + version + ( pi.isOptional() ? ";optional" : "" ) );
+                }
+                else if ( ( currentVersion == null ) && !systemPkgs.contains( pkg ) )
+                {
+                    unversioned.add( pkg );
                 }
-            } else {
+            }
+            else
+            {
                 // bnd added the import ...
-                if (currentVersion == null) {
-                    String defaultVersion = project.getDefaultPackageVersion(pkg);
-                    if (defaultVersion != null) {
-                        attrs.put(BldAttr.VERSION_ATTRIBUTE, defaultVersion);
+                if ( currentVersion == null )
+                {
+                    String defaultVersion = project.getDefaultPackageVersion( pkg );
+                    if ( defaultVersion != null )
+                    {
+                        attrs.put( BldAttr.VERSION_ATTRIBUTE, defaultVersion );
                         currentVersion = defaultVersion;
                     }
                 }
 
-                String imp = pkg + (currentVersion == null ? "" : ";version=" + currentVersion);
-                if (bndExports.contains(pkg)) {
-                    self.add(imp);
-                } else {
-                    if (pkg.equals(".")) {
-                        warnings.add("Bnd wants to import '.' (ignored)");
+                String imp = pkg + ( currentVersion == null ? "" : ";version=" + currentVersion );
+                if ( bndExports.contains( pkg ) )
+                {
+                    self.add( imp );
+                }
+                else
+                {
+                    if ( pkg.equals( "." ) )
+                    {
+                        warnings.add( "Bnd wants to import '.' (ignored)" );
                         importDot = true;
-                    } else {
-                        missing.add(imp);
+                    }
+                    else
+                    {
+                        missing.add( imp );
                     }
                 }
             }
         }
 
-        if (!modified.isEmpty() || importDot) {
-            if (importDot)
-                bndImports.remove(".");
+        if ( !modified.isEmpty() || importDot )
+        {
+            if ( importDot )
+                bndImports.remove( "." );
             // warnings.add("INFO: sigil modified imports: " + modified);
-            main.putValue(Constants.IMPORT_PACKAGE, Processor.printClauses(bndImports,
-                    "resolution:"));
+            main.putValue( Constants.IMPORT_PACKAGE, Processor.printClauses( bndImports, "resolution:" ) );
         }
 
-        if (!self.isEmpty()) {
+        if ( !self.isEmpty() )
+        {
             // warnings.add("INFO: added self imports: " + self);
         }
 
-        if (!missing.isEmpty()) {
-            warnings.add("missing imports (added): " + missing);
+        if ( !missing.isEmpty() )
+        {
+            warnings.add( "missing imports (added): " + missing );
         }
 
-        if (!unversioned.isEmpty()) {
-            warnings.add("unversioned imports: " + unversioned);
+        if ( !unversioned.isEmpty() )
+        {
+            warnings.add( "unversioned imports: " + unversioned );
         }
 
-        if (bundle.getId().equals(lastBundle)) {
-            if (!unused.isEmpty()) {
-                warnings.add("unused imports (omitted): " + unused);
+        if ( bundle.getId().equals( lastBundle ) )
+        {
+            if ( !unused.isEmpty() )
+            {
+                warnings.add( "unused imports (omitted): " + unused );
             }
         }
     }
 
-    public Properties getBndSpec(IBldBundle bundle, String dest) throws IOException {
+
+    public Properties getBndSpec( IBldBundle bundle, String dest ) throws IOException
+    {
         Properties spec = new Properties();
 
         String junkHeaders = Constants.INCLUDE_RESOURCE; // shows local build
-                                                         // paths; can be
-                                                         // verbose
+        // paths; can be
+        // verbose
         junkHeaders += "," + Constants.PRIVATE_PACKAGE; // less useful, as we
-                                                        // use it for exported
-                                                        // content too.
+        // use it for exported
+        // content too.
 
-        spec.setProperty(Constants.REMOVE_HEADERS, junkHeaders);
-        spec.setProperty(Constants.NOEXTRAHEADERS, "true"); // Created-By,
-                                                            // Bnd-LastModified
-                                                            // and Tool
-        spec.setProperty(Constants.CREATED_BY, "sigil.codecauldron.org");
+        spec.setProperty( Constants.REMOVE_HEADERS, junkHeaders );
+        spec.setProperty( Constants.NOEXTRAHEADERS, "true" ); // Created-By,
+        // Bnd-LastModified
+        // and Tool
+        spec.setProperty( Constants.CREATED_BY, "sigil.codecauldron.org" );
 
         Properties headers = bundle.getHeaders();
         // XXX: catch attempts to set headers that conflict with Bnd
         // instructions we generate?
-        spec.putAll(headers);
+        spec.putAll( headers );
 
-        spec.setProperty(Constants.BUNDLE_SYMBOLICNAME, bundle.getSymbolicName());
-        spec.setProperty(Constants.BUNDLE_VERSION, bundle.getVersion());
+        spec.setProperty( Constants.BUNDLE_SYMBOLICNAME, bundle.getSymbolicName() );
+        spec.setProperty( Constants.BUNDLE_VERSION, bundle.getVersion() );
 
         String activator = bundle.getActivator();
-        if (activator != null)
-            spec.setProperty(Constants.BUNDLE_ACTIVATOR, activator);
+        if ( activator != null )
+            spec.setProperty( Constants.BUNDLE_ACTIVATOR, activator );
 
-        addRequirements(bundle, spec);
+        addRequirements( bundle, spec );
 
-        List<String> exports = addExports(bundle, spec);
+        List<String> exports = addExports( bundle, spec );
 
-        String composites = addResources(bundle, spec);
+        String composites = addResources( bundle, spec );
 
         ArrayList<String> contents = new ArrayList<String>();
-        contents.addAll(bundle.getContents());
+        contents.addAll( bundle.getContents() );
 
-        if (contents.isEmpty()) {
-            if (!project.getSourcePkgs().isEmpty()) {
-                contents.addAll(project.getSourcePkgs());
-            } else {
-                contents.addAll(exports);
+        if ( contents.isEmpty() )
+        {
+            if ( !project.getSourcePkgs().isEmpty() )
+            {
+                contents.addAll( project.getSourcePkgs() );
+            }
+            else
+            {
+                contents.addAll( exports );
             }
         }
 
-        if (composites.length() > 0) {
-            if (spec.containsKey(Constants.BUNDLE_ACTIVATOR))
-                warnings.add("-activator ignored when -composites specified.");
-            spec.setProperty(Constants.BUNDLE_ACTIVATOR, COMPONENT_ACTIVATOR);
-            spec.setProperty(COMPONENT_FLAG, "true");
-            spec.setProperty(COMPONENT_LIST, composites);
+        if ( composites.length() > 0 )
+        {
+            if ( spec.containsKey( Constants.BUNDLE_ACTIVATOR ) )
+                warnings.add( "-activator ignored when -composites specified." );
+            spec.setProperty( Constants.BUNDLE_ACTIVATOR, COMPONENT_ACTIVATOR );
+            spec.setProperty( COMPONENT_FLAG, "true" );
+            spec.setProperty( COMPONENT_LIST, composites );
             // add activator pkg directly, to avoid needing to add jar to
             // Bundle-ClassPath.
             // split-package directive needed to stop Bnd whinging when using
             // other bundles containing the component-activator.
-            contents.add(COMPONENT_ACTIVATOR_PKG + ";-split-package:=merge-first");
+            contents.add( COMPONENT_ACTIVATOR_PKG + ";-split-package:=merge-first" );
         }
 
-        List<String> srcPkgs = addLibs(bundle, dest, spec);
+        List<String> srcPkgs = addLibs( bundle, dest, spec );
 
-        contents.addAll(srcPkgs);
-        addContents(contents, spec);
+        contents.addAll( srcPkgs );
+        addContents( contents, spec );
 
         IRequiredBundle fh = bundle.getFragmentHost();
-        if (fh != null) {
+        if ( fh != null )
+        {
             StringBuilder sb = new StringBuilder();
-            sb.append(fh.getSymbolicName());
-            addVersions(fh.getVersions(), sb);
-            spec.setProperty(Constants.FRAGMENT_HOST, sb.toString());
+            sb.append( fh.getSymbolicName() );
+            addVersions( fh.getVersions(), sb );
+            spec.setProperty( Constants.FRAGMENT_HOST, sb.toString() );
         }
 
         return spec;
     }
 
-    private void addContents(List<String> contents, Properties spec) {
+
+    private void addContents( List<String> contents, Properties spec )
+    {
         // add contents
         StringBuilder sb = new StringBuilder();
-        for (String pkg : contents) {
-            if (sb.length() > 0)
-                sb.append(",");
-            sb.append(pkg);
+        for ( String pkg : contents )
+        {
+            if ( sb.length() > 0 )
+                sb.append( "," );
+            sb.append( pkg );
         }
 
-        if (sb.length() > 0)
-            spec.setProperty(Constants.PRIVATE_PACKAGE, sb.toString());
+        if ( sb.length() > 0 )
+            spec.setProperty( Constants.PRIVATE_PACKAGE, sb.toString() );
     }
 
-    private void appendProperty(String key, String value, Properties p) {
-        String list = p.getProperty(key);
 
-        if (list == null) {
+    private void appendProperty( String key, String value, Properties p )
+    {
+        String list = p.getProperty( key );
+
+        if ( list == null )
+        {
             list = value;
-        } else {
+        }
+        else
+        {
             list = list + "," + value;
         }
 
-        p.setProperty(key, list);
+        p.setProperty( key, list );
     }
 
-    private List<String> addLibs(IBldBundle bundle, String dest, Properties spec)
-            throws IOException {
+
+    private List<String> addLibs( IBldBundle bundle, String dest, Properties spec ) throws IOException
+    {
         // final String cleanVersion =
         // Builder.cleanupVersion(bundle.getVersion());
         final String name = bundle.getSymbolicName();
@@ -488,186 +564,213 @@
         ArrayList<String> srcPkgs = new ArrayList<String>();
         Map<String, Map<String, String>> libs = bundle.getLibs();
 
-        if (!bundle.getDownloadContents().isEmpty()) {
+        if ( !bundle.getDownloadContents().isEmpty() )
+        {
             // implicitly add dljar
-            File fdest = new File(dest);
-            String dlname = fdest.getName().replaceFirst("\\.jar$", "-dl.jar");
+            File fdest = new File( dest );
+            String dlname = fdest.getName().replaceFirst( "\\.jar$", "-dl.jar" );
 
             HashMap<String, String> attr = new HashMap<String, String>();
-            attr.put(BldAttr.KIND_ATTRIBUTE, "codebase");
-            attr.put(BldAttr.PUBLISH_ATTRIBUTE, dlname);
+            attr.put( BldAttr.KIND_ATTRIBUTE, "codebase" );
+            attr.put( BldAttr.PUBLISH_ATTRIBUTE, dlname );
 
             HashMap<String, Map<String, String>> lib2 = new HashMap<String, Map<String, String>>();
-            lib2.putAll(libs);
-            lib2.put(dlname, attr);
+            lib2.putAll( libs );
+            lib2.put( dlname, attr );
             libs = lib2;
         }
 
         StringBuilder items = new StringBuilder();
 
-        for (String jarpath : libs.keySet()) {
-            Map<String, String> attr = libs.get(jarpath);
-            String kind = attr.get(BldAttr.KIND_ATTRIBUTE);
-            String publish = attr.get(BldAttr.PUBLISH_ATTRIBUTE);
+        for ( String jarpath : libs.keySet() )
+        {
+            Map<String, String> attr = libs.get( jarpath );
+            String kind = attr.get( BldAttr.KIND_ATTRIBUTE );
+            String publish = attr.get( BldAttr.PUBLISH_ATTRIBUTE );
 
             // first find the lib ..
-            String path = attr.get(BldAttr.PATH_ATTRIBUTE);
-            if (path == null)
+            String path = attr.get( BldAttr.PATH_ATTRIBUTE );
+            if ( path == null )
                 path = jarpath;
 
-            File fsPath = bundle.resolve(path);
+            File fsPath = bundle.resolve( path );
 
-            if (!fsPath.exists()) {
+            if ( !fsPath.exists() )
+            {
                 // try destDir
-                File destDir = new File(dest).getParentFile();
-                File file = new File(destDir, fsPath.getName());
+                File destDir = new File( dest ).getParentFile();
+                File file = new File( destDir, fsPath.getName() );
 
-                if (!file.exists()) {
+                if ( !file.exists() )
+                {
                     // try searching classpath
-                    file = findInClasspathDir(fsPath.getName());
+                    file = findInClasspathDir( fsPath.getName() );
                 }
 
-                if (file != null && file.exists())
+                if ( file != null && file.exists() )
                     fsPath = file;
             }
 
-            if (!fsPath.exists()) {
+            if ( !fsPath.exists() )
+            {
                 // XXX: find external bundle using name and version range?
                 // For now just let BND fail when it can't find resource.
             }
 
-            appendProperty(Constants.INCLUDE_RESOURCE, jarpath + "=" + fsPath, spec);
+            appendProperty( Constants.INCLUDE_RESOURCE, jarpath + "=" + fsPath, spec );
 
-            if ("classpath".equals(kind)) {
-                String bcp = spec.getProperty(Constants.BUNDLE_CLASSPATH);
-                if (bcp == null || bcp.length() == 0)
-                    spec.setProperty(Constants.BUNDLE_CLASSPATH, ".");
-                appendProperty(Constants.BUNDLE_CLASSPATH, jarpath, spec);
+            if ( "classpath".equals( kind ) )
+            {
+                String bcp = spec.getProperty( Constants.BUNDLE_CLASSPATH );
+                if ( bcp == null || bcp.length() == 0 )
+                    spec.setProperty( Constants.BUNDLE_CLASSPATH, "." );
+                appendProperty( Constants.BUNDLE_CLASSPATH, jarpath, spec );
             }
 
-            if (publish != null) {
-                String pubtype = attr.get(BldAttr.PUBTYPE_ATTRIBUTE);
-                if (pubtype == null)
+            if ( publish != null )
+            {
+                String pubtype = attr.get( BldAttr.PUBTYPE_ATTRIBUTE );
+                if ( pubtype == null )
                     pubtype = defaultPubtype;
 
-                if ("codebase".equals(kind)) {
-                    String codebase = format(codebaseFormat, publish, name, pubtype);
-                    String zone = attr.get(BldAttr.ZONE_ATTRIBUTE);
-                    if (zone != null)
+                if ( "codebase".equals( kind ) )
+                {
+                    String codebase = format( codebaseFormat, publish, name, pubtype );
+                    String zone = attr.get( BldAttr.ZONE_ATTRIBUTE );
+                    if ( zone != null )
                         codebase += "&zone=" + zone;
-                    appendProperty("RMI-Codebase", codebase, spec);
+                    appendProperty( "RMI-Codebase", codebase, spec );
                 }
 
                 // add item to publish xml
-                items.append(format("<item name=\"%s\" path=\"%s\">\n", publish, jarpath));
-                items.append(format("<attribute name=\"type\" value=\"%s\"/>\n", pubtype));
-                items.append("</item>\n");
+                items.append( format( "<item name=\"%s\" path=\"%s\">\n", publish, jarpath ) );
+                items.append( format( "<attribute name=\"type\" value=\"%s\"/>\n", pubtype ) );
+                items.append( "</item>\n" );
             }
         }
 
-        if (items.length() > 0) {
-            File publishFile = new File(dest.replaceFirst("\\.jar$", "-publish.xml"));
+        if ( items.length() > 0 )
+        {
+            File publishFile = new File( dest.replaceFirst( "\\.jar$", "-publish.xml" ) );
             publishFile.deleteOnExit();
-            PrintWriter writer = new PrintWriter(new FileWriter(publishFile));
+            PrintWriter writer = new PrintWriter( new FileWriter( publishFile ) );
 
-            writer.println("<publish>");
-            writer.println(format("<attribute name=\"bundle.symbolic.name\" value=\"%s\"/>", name));
-            writer.print(items.toString());
-            writer.println("</publish>");
+            writer.println( "<publish>" );
+            writer.println( format( "<attribute name=\"bundle.symbolic.name\" value=\"%s\"/>", name ) );
+            writer.print( items.toString() );
+            writer.println( "</publish>" );
             writer.close();
 
-            appendProperty(Constants.INCLUDE_RESOURCE, "publish.xml=" + publishFile, spec);
+            appendProperty( Constants.INCLUDE_RESOURCE, "publish.xml=" + publishFile, spec );
         }
 
         return srcPkgs;
     }
 
-    private String addResources(IBldBundle bundle, Properties spec) {
+
+    private String addResources( IBldBundle bundle, Properties spec )
+    {
         Map<String, String> resources = bundle.getResources();
         StringBuilder composites = new StringBuilder();
 
-        for (String composite : bundle.getComposites()) {
-            File path = bundle.resolve(composite);
+        for ( String composite : bundle.getComposites() )
+        {
+            File path = bundle.resolve( composite );
             String name = path.getName();
 
             String bPath = COMPONENT_DIR + "/" + name;
-            resources.put(bPath, path.getPath());
+            resources.put( bPath, path.getPath() );
 
-            if (composites.length() > 0)
-                composites.append(",");
-            composites.append(bPath);
+            if ( composites.length() > 0 )
+                composites.append( "," );
+            composites.append( bPath );
         }
 
         StringBuilder sb = new StringBuilder();
 
-        for (String bPath : resources.keySet()) {
-            if (bPath.startsWith("@")) { // Bnd in-line jar
-                if (sb.length() > 0)
-                    sb.append(",");
-                sb.append('@');
-                sb.append(bundle.resolve(bPath.substring(1)));
+        for ( String bPath : resources.keySet() )
+        {
+            if ( bPath.startsWith( "@" ) )
+            { // Bnd in-line jar
+                if ( sb.length() > 0 )
+                    sb.append( "," );
+                sb.append( '@' );
+                sb.append( bundle.resolve( bPath.substring( 1 ) ) );
                 continue;
             }
 
-            String fsPath = resources.get(bPath);
-            if ("".equals(fsPath))
+            String fsPath = resources.get( bPath );
+            if ( "".equals( fsPath ) )
                 fsPath = bPath;
 
-            File resolved = bundle.resolve(fsPath);
+            File resolved = bundle.resolve( fsPath );
 
             // fsPath may contain Bnd variable, making path appear to not exist
 
-            if (!resolved.exists()) {
+            if ( !resolved.exists() )
+            {
                 // Bnd already looks for classpath jars
-                File found = findInClasspathDir(fsPath);
-                if (found != null) {
+                File found = findInClasspathDir( fsPath );
+                if ( found != null )
+                {
                     fsPath = found.getPath();
-                } else {
+                }
+                else
+                {
                     fsPath = resolved.getAbsolutePath();
                 }
-            } else {
+            }
+            else
+            {
                 fsPath = resolved.getAbsolutePath();
             }
 
-            if (sb.length() > 0)
-                sb.append(",");
-            sb.append(bPath);
-            sb.append('=');
-            sb.append(fsPath);
+            if ( sb.length() > 0 )
+                sb.append( "," );
+            sb.append( bPath );
+            sb.append( '=' );
+            sb.append( fsPath );
         }
 
-        if (sb.length() > 0)
-            spec.setProperty(Constants.INCLUDE_RESOURCE, sb.toString());
+        if ( sb.length() > 0 )
+            spec.setProperty( Constants.INCLUDE_RESOURCE, sb.toString() );
 
         return composites.toString();
     }
 
-    private List<IPackageImport> getImports(IBldBundle bundle) {
+
+    private List<IPackageImport> getImports( IBldBundle bundle )
+    {
         List<IPackageImport> imports = bundle.getImports();
         Set<String> pkgs = new HashSet<String>();
 
-        for (IPackageImport pi : imports) {
-            pkgs.add(pi.getPackageName());
+        for ( IPackageImport pi : imports )
+        {
+            pkgs.add( pi.getPackageName() );
         }
 
         // add component activator imports
-        if (!bundle.getComposites().isEmpty()) {
-            for (String pkg : BundleBuilder.COMPONENT_ACTIVATOR_DEPS) {
-                if (pkgs.contains(pkg))
+        if ( !bundle.getComposites().isEmpty() )
+        {
+            for ( String pkg : BundleBuilder.COMPONENT_ACTIVATOR_DEPS )
+            {
+                if ( pkgs.contains( pkg ) )
                     continue;
                 PackageImport pi = new PackageImport();
-                pi.setPackageName(pkg);
-                String versions = project.getDefaultPackageVersion(pkg);
-                if (versions != null)
-                    pi.setVersions(VersionRange.parseVersionRange(versions));
-                imports.add(pi);
+                pi.setPackageName( pkg );
+                String versions = project.getDefaultPackageVersion( pkg );
+                if ( versions != null )
+                    pi.setVersions( VersionRange.parseVersionRange( versions ) );
+                imports.add( pi );
             }
         }
 
         return imports;
     }
 
-    private void addRequirements(IBldBundle bundle, Properties spec) {
+
+    private void addRequirements( IBldBundle bundle, Properties spec )
+    {
         StringBuilder sb = new StringBuilder();
 
         // option;addMissingImports=true
@@ -680,115 +783,138 @@
         // avoids warnings like:
         // "Importing packages that are never referred to by any class on the Bundle-ClassPath"
 
-        if (omitUnusedImports && !addMissingImports) {
-            warnings.add("omitUnusedImports ignored as addMissingImports=false.");
+        if ( omitUnusedImports && !addMissingImports )
+        {
+            warnings.add( "omitUnusedImports ignored as addMissingImports=false." );
             omitUnusedImports = false;
         }
 
-        List<IPackageImport> imports = getImports(bundle);
+        List<IPackageImport> imports = getImports( bundle );
 
-        sb.setLength(0);
+        sb.setLength( 0 );
 
         // allow existing header;Package-Import to specify ignored packages
-        sb.append(spec.getProperty(Constants.IMPORT_PACKAGE, ""));
+        sb.append( spec.getProperty( Constants.IMPORT_PACKAGE, "" ) );
 
-        for (IPackageImport pi : imports) {
-            switch (pi.getOSGiImport()) {
-            case AUTO:
-                if (omitUnusedImports)
-                    continue; // added by Import-Package: * and fixed by
-                              // augmentImports()
-                break;
-            case NEVER:
-                if (pi.isDependency())
-                    continue; // resolve=compile
-                break;
-            case ALWAYS:
-                // Bnd will probably whinge that this import is not used.
-                // we omit it here and replace it in augmentImports,
-                // but only if addMissingImports is true;
-                // otherwise, if the import is used, Bnd will fail.
-                if (addMissingImports)
-                    continue;
-                break;
+        for ( IPackageImport pi : imports )
+        {
+            switch ( pi.getOSGiImport() )
+            {
+                case AUTO:
+                    if ( omitUnusedImports )
+                        continue; // added by Import-Package: * and fixed by
+                    // augmentImports()
+                    break;
+                case NEVER:
+                    if ( pi.isDependency() )
+                        continue; // resolve=compile
+                    break;
+                case ALWAYS:
+                    // Bnd will probably whinge that this import is not used.
+                    // we omit it here and replace it in augmentImports,
+                    // but only if addMissingImports is true;
+                    // otherwise, if the import is used, Bnd will fail.
+                    if ( addMissingImports )
+                        continue;
+                    break;
+            }
+
+            if ( sb.length() > 0 )
+                sb.append( "," );
+
+            if ( pi.getOSGiImport().equals( IPackageImport.OSGiImport.NEVER ) )
+            {
+                sb.append( "!" );
+                sb.append( pi.getPackageName() );
             }
-
-            if (sb.length() > 0)
-                sb.append(",");
-
-            if (pi.getOSGiImport().equals(IPackageImport.OSGiImport.NEVER)) {
-                sb.append("!");
-                sb.append(pi.getPackageName());
-            } else {
-                sb.append(pi.getPackageName());
-                addVersions(pi.getVersions(), sb);
-
-                if (pi.isOptional()) {
-                    sb.append(";resolution:=optional");
+            else
+            {
+                sb.append( pi.getPackageName() );
+                addVersions( pi.getVersions(), sb );
+
+                if ( pi.isOptional() )
+                {
+                    sb.append( ";resolution:=optional" );
                 }
             }
         }
 
-        if (addMissingImports) {
-            if (sb.length() > 0)
-                sb.append(",");
-            sb.append("*");
+        if ( addMissingImports )
+        {
+            if ( sb.length() > 0 )
+                sb.append( "," );
+            sb.append( "*" );
         }
 
-        spec.setProperty(Constants.IMPORT_PACKAGE, sb.toString());
+        spec.setProperty( Constants.IMPORT_PACKAGE, sb.toString() );
 
-        sb.setLength(0);
-        for (IRequiredBundle rb : bundle.getRequires()) {
-            if (sb.length() > 0)
-                sb.append(",");
-            sb.append(rb.getSymbolicName());
-            addVersions(rb.getVersions(), sb);
+        sb.setLength( 0 );
+        for ( IRequiredBundle rb : bundle.getRequires() )
+        {
+            if ( sb.length() > 0 )
+                sb.append( "," );
+            sb.append( rb.getSymbolicName() );
+            addVersions( rb.getVersions(), sb );
         }
 
-        if (sb.length() > 0) {
-            spec.setProperty(Constants.REQUIRE_BUNDLE, sb.toString());
+        if ( sb.length() > 0 )
+        {
+            spec.setProperty( Constants.REQUIRE_BUNDLE, sb.toString() );
         }
     }
 
-    private List<String> addExports(IBldBundle bundle, Properties spec) {
+
+    private List<String> addExports( IBldBundle bundle, Properties spec )
+    {
         List<IPackageExport> exports = bundle.getExports();
         ArrayList<String> list = new ArrayList<String>();
         StringBuilder sb = new StringBuilder();
 
-        for (IPackageExport export : exports) {
-            if (sb.length() > 0)
-                sb.append(",");
-            sb.append(export.getPackageName());
-            if (!export.getVersion().equals(Version.emptyVersion)) {
-                sb.append(";version=\"");
-                sb.append(export.getVersion());
-                sb.append("\"");
+        for ( IPackageExport export : exports )
+        {
+            if ( sb.length() > 0 )
+                sb.append( "," );
+            sb.append( export.getPackageName() );
+            if ( !export.getVersion().equals( Version.emptyVersion ) )
+            {
+                sb.append( ";version=\"" );
+                sb.append( export.getVersion() );
+                sb.append( "\"" );
             }
-            list.add(export.getPackageName());
+            list.add( export.getPackageName() );
         }
 
-        if (sb.length() > 0) {
+        if ( sb.length() > 0 )
+        {
             // EXPORT_CONTENTS just sets the Export-Package manifest header;
             // it doesn't add contents like EXPORT_PACKAGE does.
-            spec.setProperty(Constants.EXPORT_CONTENTS, sb.toString());
+            spec.setProperty( Constants.EXPORT_CONTENTS, sb.toString() );
         }
 
         return list;
     }
 
-    private void addVersions(VersionRange range, StringBuilder sb) {
-        if (!range.equals(VersionRange.ANY_VERSION)) {
-            sb.append(";version=\"");
-            sb.append(range);
-            sb.append("\"");
+
+    private void addVersions( VersionRange range, StringBuilder sb )
+    {
+        if ( !range.equals( VersionRange.ANY_VERSION ) )
+        {
+            sb.append( ";version=\"" );
+            sb.append( range );
+            sb.append( "\"" );
         }
     }
 
-    private File findInClasspathDir(String file) {
-        for (File cp : classpath) {
-            if (cp.isDirectory()) {
-                File path = new File(cp, file);
-                if (path.exists()) {
+
+    private File findInClasspathDir( String file )
+    {
+        for ( File cp : classpath )
+        {
+            if ( cp.isDirectory() )
+            {
+                File path = new File( cp, file );
+                if ( path.exists() )
+                {
                     return path;
                 }
             }



Mime
View raw message