Source Code Cross Referenced for CompCSCreationOperation.java in  » IDE-Eclipse » Eclipse-plug-in-development » org » eclipse » pde » internal » ui » wizards » cheatsheet » 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.ui.wizards.cheatsheet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2006, 2007 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 Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.pde.internal.ui.wizards.cheatsheet;
011:
012:        import org.eclipse.core.resources.IFile;
013:        import org.eclipse.core.runtime.jobs.ISchedulingRule;
014:        import org.eclipse.jface.operation.IRunnableWithProgress;
015:        import org.eclipse.pde.internal.core.cheatsheet.comp.CompCSWorkspaceModel;
016:        import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCS;
017:        import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSConstants;
018:        import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSIntro;
019:        import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSModelFactory;
020:        import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSObject;
021:        import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSOnCompletion;
022:        import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSTask;
023:        import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSTaskGroup;
024:        import org.eclipse.pde.internal.ui.PDEUIMessages;
025:
026:        /**
027:         * CompCSCreationOperation
028:         *
029:         */
030:        public class CompCSCreationOperation extends BaseCSCreationOperation
031:                implements  IRunnableWithProgress {
032:
033:            /**
034:             * @param file
035:             */
036:            public CompCSCreationOperation(IFile file) {
037:                super (file);
038:            }
039:
040:            /**
041:             * @param rule
042:             */
043:            public CompCSCreationOperation(ISchedulingRule rule) {
044:                super (rule);
045:            }
046:
047:            /* (non-Javadoc)
048:             * @see org.eclipse.pde.internal.ui.wizards.cheatsheet.BaseCheatSheetCreationOperation#createContent()
049:             */
050:            protected void createContent() {
051:                CompCSWorkspaceModel model = new CompCSWorkspaceModel(fFile,
052:                        false);
053:                initializeCS(model.getCompCS());
054:                model.save();
055:                model.dispose();
056:            }
057:
058:            /**
059:             * @param compCS
060:             */
061:            private void initializeCS(ICompCS compCS) {
062:                // Create Task Group
063:                // Element: taskGroup
064:                ICompCSTaskGroup taskGroup = createBasicGroup(compCS);
065:                // Create Task
066:                // Element: task
067:                ICompCSTask task = createBasicTask(taskGroup);
068:                // Configure Group
069:                taskGroup.addFieldTaskObject(task);
070:                // Configure Cheat Sheet
071:                // Attribute: name
072:                compCS
073:                        .setFieldName(PDEUIMessages.CompCSCreationOperation_title);
074:                compCS.setFieldTaskObject(taskGroup);
075:            }
076:
077:            /**
078:             * @param parent
079:             * @return
080:             */
081:            public static ICompCSTask createBasicTask(ICompCSObject parent) {
082:                ICompCSModelFactory factory = parent.getModel().getFactory();
083:                // Create Task
084:                // Element: task
085:                ICompCSTask task = factory.createCompCSTask(parent);
086:                // Configure Task
087:                // Element: intro
088:                ICompCSIntro taskIntro = factory.createCompCSIntro(task);
089:                taskIntro
090:                        .setFieldContent(formatTextBold(PDEUIMessages.CompCSCreationOperation_introduction));
091:                // Element: onCompletion
092:                ICompCSOnCompletion taskConclusion = factory
093:                        .createCompCSOnCompletion(task);
094:                taskConclusion
095:                        .setFieldContent(formatTextBold(PDEUIMessages.CompCSCreationOperation_conclusion));
096:                // Attribute: name
097:                task.setFieldName(PDEUIMessages.CompCSCreationOperation_task);
098:                // Attribute: kind
099:                task.setFieldKind(ICompCSConstants.ATTRIBUTE_VALUE_CHEATSHEET);
100:                task.setFieldIntro(taskIntro);
101:                task.setFieldOnCompletion(taskConclusion);
102:
103:                return task;
104:            }
105:
106:            /**
107:             * @param parent
108:             * @return
109:             */
110:            public static ICompCSTaskGroup createBasicGroup(ICompCSObject parent) {
111:                ICompCSModelFactory factory = parent.getModel().getFactory();
112:                // Create Task Group
113:                // Element: taskGroup
114:                ICompCSTaskGroup taskGroup = factory
115:                        .createCompCSTaskGroup(parent);
116:                // Configure Task Group
117:                // Element: intro
118:                ICompCSIntro taskGroupIntro = factory
119:                        .createCompCSIntro(taskGroup);
120:                taskGroupIntro
121:                        .setFieldContent(formatTextBold(PDEUIMessages.CompCSCreationOperation_introduction));
122:                // Element: onCompletion
123:                ICompCSOnCompletion taskGroupConclusion = factory
124:                        .createCompCSOnCompletion(taskGroup);
125:                taskGroupConclusion
126:                        .setFieldContent(formatTextBold(PDEUIMessages.CompCSCreationOperation_conclusion));
127:                // Attribute: name
128:                taskGroup
129:                        .setFieldName(PDEUIMessages.CompCSCreationOperation_group);
130:                // Attribute: kind
131:                taskGroup.setFieldKind(ICompCSConstants.ATTRIBUTE_VALUE_SET);
132:                taskGroup.setFieldIntro(taskGroupIntro);
133:                taskGroup.setFieldOnCompletion(taskGroupConclusion);
134:
135:                return taskGroup;
136:            }
137:        }
ww__w_.j___a_v__a_2_s___.__c__o_m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.