Source Code Cross Referenced for FeatureGeneratorTask.java in  » IDE-Eclipse » Eclipse-plug-in-development » org » eclipse » pde » internal » build » tasks » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » Eclipse plug in development » org.eclipse.pde.internal.build.tasks 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2006 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         * 
008:         * Contributors:
009:         *     IBM - Initial API and implementation
010:         *******************************************************************************/package org.eclipse.pde.internal.build.tasks;
011:
012:        import java.io.File;
013:        import java.util.Properties;
014:        import org.apache.tools.ant.BuildException;
015:        import org.apache.tools.ant.Task;
016:        import org.eclipse.core.runtime.CoreException;
017:        import org.eclipse.pde.internal.build.*;
018:        import org.eclipse.pde.internal.build.site.BuildTimeSiteFactory;
019:
020:        /**
021:         * Generate a container feature based on a .product file and/or provided feature, plugin lists
022:         * @since 3.2
023:         */
024:        public class FeatureGeneratorTask extends Task {
025:            private FeatureGenerator generator = new FeatureGenerator();
026:            private Properties antProperties = new Properties();
027:
028:            public void execute() throws BuildException {
029:                try {
030:                    BundleHelper.getDefault().setLog(this );
031:                    String value = getProject().getProperty(
032:                            IBuildPropertiesConstants.RESOLVER_DEV_MODE);
033:                    if (Boolean.valueOf(value).booleanValue())
034:                        antProperties.put(
035:                                IBuildPropertiesConstants.RESOLVER_DEV_MODE,
036:                                "true"); //$NON-NLS-1$
037:                    generator.setImmutableAntProperties(antProperties);
038:                    run();
039:                    BundleHelper.getDefault().setLog(null);
040:                } catch (CoreException e) {
041:                    throw new BuildException(TaskHelper.statusToString(
042:                            e.getStatus(), null).toString());
043:                }
044:            }
045:
046:            public void run() throws CoreException {
047:                generator.generate();
048:            }
049:
050:            /** 
051:             * Set the folder in which the build will occur.
052:             * @param buildDirectory the location where the build will occur.
053:             */
054:            public void setBuildDirectory(String buildDirectory) {
055:                generator.setWorkingDirectory(buildDirectory);
056:            }
057:
058:            /**
059:             * Set the product file to base the feature on
060:             * @param productFile
061:             */
062:            public void setProductFile(String productFile) {
063:                generator.setProductFile(productFile);
064:            }
065:
066:            /**
067:             * Set whether or not to automatically include the launchers in the product
068:             * Default is true
069:             * @param includeLaunchers
070:             */
071:            public void setIncludeLaunchers(boolean includeLaunchers) {
072:                generator.setIncludeLaunchers(includeLaunchers);
073:            }
074:
075:            /**
076:             * Set a location that contains plugins and features required by plugins and features 
077:             * for which the feature is being generated
078:             * @param baseLocation
079:             */
080:            public void setBaseLocation(String baseLocation) {
081:                BuildTimeSiteFactory.setInstalledBaseSite(baseLocation);
082:            }
083:
084:            /**
085:             * Set a list of plugin ids to be included in the generated feature
086:             * @param pluginList a comma separated list of plugin ids
087:             */
088:            public void setPluginList(String pluginList) {
089:                if (pluginList != null && !pluginList.startsWith("${")) //$NON-NLS-1$
090:                    generator.setPluginList(Utils
091:                            .getArrayFromString(pluginList));
092:            }
093:
094:            /**
095:             * Set a list of plugin fragment ids to be included in the generated feature
096:             * @param fragmentList a comma separated list of plugin ids
097:             */
098:            public void setFragmentList(String fragmentList) {
099:                if (fragmentList != null && !fragmentList.startsWith("${")) //$NON-NLS-1$
100:                    generator.setFragmentList(Utils
101:                            .getArrayFromString(fragmentList));
102:            }
103:
104:            /**
105:             * Set a list of feature ids to be include in the generated feature
106:             * @param featureList a comma separated list of feature ids
107:             */
108:            public void setFeatureList(String featureList) {
109:                if (featureList != null && !featureList.startsWith("${")) //$NON-NLS-1$
110:                    generator.setFeatureList(Utils
111:                            .getArrayFromString(featureList));
112:            }
113:
114:            /**
115:             * The id to give to the generated feature
116:             * @param featureId
117:             */
118:            public void setFeatureId(String featureId) {
119:                generator.setFeatureId(featureId);
120:            }
121:
122:            /**
123:             * Set the list of additional paths in which to look for required plugins
124:             * 
125:             * @param pluginPath a {@link File.pathSeparator} separated list of paths
126:             */
127:            public void setPluginPath(String pluginPath) {
128:                generator.setPluginPath(Utils.getArrayFromString(pluginPath,
129:                        File.pathSeparator));
130:            }
131:
132:            /**
133:             * Set to true if you want to verify that the plugins and features are available.  
134:             * @param verify
135:             */
136:            public void setVerify(boolean verify) {
137:                generator.setVerify(verify);
138:            }
139:
140:            /** 
141:             * Set the configuration for which the script should be generated. The default is set to be configuration independent.
142:             * @param configInfo an ampersand separated list of configuration (for example win32, win32, x86 & macoxs, carbon, ppc).
143:             * @throws CoreException
144:             */
145:            public void setConfigInfo(String configInfo) throws CoreException {
146:                AbstractScriptGenerator.setConfigInfo(configInfo);
147:            }
148:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.